Part Number Hot Search : 
IVA04118 C1210 A3940KLP KE180 AD73522 22721 MC10136P MC10136P
Product Description
Full Text Search
 

To Download XR16M890IL40 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  exar corporation 48720 kato road, fremont ca, 94538 ? (510) 668-7000 ? fax (510) 668-7017 ? www.exar.com xr16m890 uart with 128-byte fifo and integrated level shifters april 2011 rev. 1.0.0 general description the xr16m890 1 (m890) is a single-channel universal asynchronous re ceiver and transmitter (uart) with integrated level shifters and 128 bytes of transmit and receive fifos. for flexibility in a mixed voltage environment, the m890 has 4 vcc pins. there is a vcc pin for the core, a vcc pin for the uart signals, a vcc pin for the cpu interface signals and a vcc pin for the gpio signals. the vcc pins for the uart, gpio and cpu interface signals allow for the m890 to interface with devices operat ing at different voltage levels eliminating the need for external voltage level shifters. the auto rs-485 half-duplex direction control feature simplifies both the hardware and software for half-duplex rs-485 applications. in addition, the multidrop mode with auto address detection and address byte control features increase the performance by simplifying the software routines. the independent tx/rx baud rate generator feature allows the transmitter and receiver to operate at different baud rates. in addition, the fractional baud rate generator featur e provides flexibility for crystal/clock frequencies for generating standard and non-standard baud rates. the m890 has programmable transmit and receive fifo trigger levels , automatic hardware and software flow control, and data rates of up to 24 mbps. power consumption of the m890 can be minimized by enabling the sleep mode. the m890 has a 16550 compatible register set that provide users with operating status and control, receiver error indications, and modem serial interface controls. an internal lo opback capability allows onboard diagnostics. the m890 has a selectable intel/motorola/vlio bus interface. n ote : 1 covered by u.s. patent #5,649,122. features ? integrated level shifters on cpu interface, uart and gpio signals ? intel/motorola/vlio bus interface select ?0? ns address setup/hold times ? 24 mbps maximum uart data rate ? up to 16 gpios ? 128-bytes tx and rx fifos ? programmable tx/rx trigger levels ? tx/rx fifo level counters ? independent tx/rx baud rate generator ? fractional baud rate generator ? auto rts/cts hardware flow control ? auto xon/xoff software flow control ? auto rs-485 half-duple x direction control ? multidrop mode w/ auto address detect (rx) ? multidrop mode w/ addr ess byte control (tx) ? sleep mode with automatic wake-up ? infrared (irda 1.0 and 1.1) mode ? 1.62v to 3.63v supply operation ? 5v tolerant inputs ? crystal oscillator or external clock input applications ? personal digital assistants (pda) ? cellular phones/data devices ? battery-operated devices ? global positioning system (gps) ? bluetooth
xr16m890 2 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 f igure 1. xr16m890 b lock d iagram vcc_core intel/ motorola/ vlio bus interface vcc_bus 1.62v- 3.63v i/o buffers vcc_uart uart regs fractional brg 128-byte tx fifo 128-byte rx fifo tx rx crystal oscillator/ buffer gpios tx rx rts# cts# a2:a0 d7:d0 (ad7:ad0) cs# ior# iow# (r/w#) int (irq#) reset (reset#) 16/68# xtal1 xtal2 1.62v- 3.63v i/o buffers vlio_en lla# gpio[3:0] flow control en485# enir# gpio[15:4] 1.62v- 3.63v i/o buffers vcc_gpio s lee p /pwrdn# ordering information p art n umber p ackage n umber o f gpio s o perating t emperature r ange d evice s tatus xr16m890il32-f qfn-32 4 -40c to +85c active xr16m890il32tr-f qfn-32 4 -40c to +85c active XR16M890IL40-f qfn-40 8 -40c to +85c active XR16M890IL40tr-f qfn-40 8 -40c to +85c active xr16m890im48-f tqfp-48 16 -40c to +85c active xr16m890im48tr-f tqfp-48 16 -40c to +85c active n ote : tr = tape and reel, f = green / rohs
f igure 2. p in o ut a ssignments - 48- pin tqfp 16/68# d0 d1 d2 d3 d4 d5 d6 d7 ior# iow# cs# dsr#/gpio1 cd#/gpio2 ri#/gpio3 gnd vcc_uart gpio15 gpio14 gpio13 gpio4 gpio5 gpio6 gpio7 reset sleep/pwrdn# int en485# gnd vcc_bus gpio8 gpio9 gpio10 gpio11 gpio12 vcc_gpio a0 a1 a2 vlio_en xtal2 xtal1 vcc_core rx tx rts# cts# dtr#/gpio0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 36 35 34 33 32 31 30 29 28 27 26 25 48 47 46 45 44 43 42 41 40 39 38 37 xr16m890im48 intel (16) mode vcc_bus gnd 16/68# d0 d1 d2 d3 d4 d5 d6 d7 ior# r/w# cs# dsr#/gpio1 cd#/gpio2 ri#/gpio3 gnd vcc_uart gpio15 gpio14 gpio13 gpio4 gpio5 gpio6 gpio7 reset# sleep/pwrdn# irq# en485# gnd vcc_bus gpio8 gpio9 gpio10 gpio11 gpio12 vcc_gpio a0 a1 a2 vlio_en xtal2 xtal1 vcc_core rx tx rts# cts# dtr#/gpio0 xr16m890im48 motorola (68) mode gnd gnd vcc_bus 16/68# ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 ior# iow# cs# dsr#/gpio1 cd#/gpio2 ri#/gpio3 gnd vcc_uart gpio15 gpio14 gpio13 gpio4 gpio5 gpio6 gpio7 reset sleep/pwrdn# int en485# gnd vcc_bus gpio8 gpio9 gpio10 gpio11 gpio12 vcc_gpio lla# gnd enir# vlio_en xtal2 xtal1 vcc_core rx tx rts# cts# dtr#/gpio0 xr16m890im48 vlio mode gnd vcc_bus 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 36 35 34 33 32 31 30 29 28 27 26 25 48 47 46 45 44 43 42 41 40 39 38 37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 36 35 34 33 32 31 30 29 28 27 26 25 48 47 46 45 44 43 42 41 40 39 38 37 xr16m890 3 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters
f igure 3. p in o ut a ssignments - 40- pin qfn and 32- pin qfn 16/68# d0 d1 d2 d3 d4 d5 d6 d7 reset XR16M890IL40 intel (16) mode cts# dtr#/gpio0 dsr#/gpio1 cd#/gpio2 ri#/gpio3 gnd vcc_uart gpio4 gpio5 gpio6 sleep/pwrdn# int en485# gnd vcc_bus ior# iow# cs# vcc_gpio gpio7 a0 a1 a2 vlio_en xtal2 xtal1 vcc_core rx tx rts# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 30 29 28 27 26 25 24 23 22 21 40 39 38 37 36 35 34 33 32 31 vcc_bus gnd 16/68# d0 d1 d2 d3 d4 d5 d6 d7 reset# XR16M890IL40 motorola (68) mode cts# dtr#/gpio0 dsr#/gpio1 cd#/gpio2 ri#/gpio3 gnd vcc_uart gpio4 gpio5 gpio6 sleep/pwrdn# irq# en485# gnd vcc_bus ior# r/w# cs# vcc_gpio gpio7 a0 a1 a2 vlio_en xtal2 xtal1 vcc_core rx tx rts# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 30 29 28 27 26 25 24 23 22 21 40 39 38 37 36 35 34 33 32 31 gnd gnd 16/68# ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 reset XR16M890IL40 vlio mode cts# dtr#/gpio0 dsr#/gpio1 cd#/gpio2 ri#/gpio3 gnd vcc_uart gpio4 gpio5 gpio6 sleep/pwrdn# int en485# gnd vcc_bus ior# iow# cs# vcc_gpio gpio7 lla# gnd enir# vlio_en xtal2 xtal1 vcc_core rx tx rts# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 30 29 28 27 26 25 24 23 22 21 40 39 38 37 36 35 34 33 32 31 gnd vcc_bus d0 d1 d2 d3 d4 d5 d6 d7 xr16m890il32 intel (16) mode dtr#/gpio0 dsr#/gpio1 cd#/gpio2 ri#/gpio3 vcc_uart rts# rx tx reset int gnd vcc_bus ior# iow# cs# cts# 16/68# a0 a1 a2 vlio_en xtal2 xtal1 vcc_core 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 24 23 22 21 20 19 18 17 32 31 30 29 28 27 26 25 gnd vcc_bus d0 d1 d2 d3 d4 d5 d6 d7 xr16m890il32 motorola (68) mode dtr#/gpio0 dsr#/gpio1 cd#/gpio2 ri#/gpio3 vcc_uart rts# rx tx reset# irq# gnd vcc_bus ior# r/w# cs# cts# 16/68# a0 a1 a2 vlio_en xtal2 xtal1 vcc_core 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 24 23 22 21 20 19 18 17 32 31 30 29 28 27 26 25 gnd gnd ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 xr16m890il32 vlio mode dtr#/gpio0 dsr#/gpio1 cd#/gpio2 ri#/gpio3 vcc_uart rts# rx tx reset int gnd vcc_bus ior# iow# cs# cts# sleep/pwrdn lla# en485# enir# vlio_en xtal2 xtal1 vcc_core 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 24 23 22 21 20 19 18 17 32 31 30 29 28 27 26 25 vcc_bus xr16m890 4 uart with 128-byte fifo and integrated level shifters rev. 1.0.0
xr16m890 5 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters pin descriptions pin description n ame qfn-32 p in # qfn-40 pin# tqfp-48 pin# t ype d escription data bus interface - intel/motorola 16/68# 32 1 1 i intel or motorola bus select. this pin selects the 16 or 68 mode when vlio_en is a logic 0. in the vlio mode (vlio_en is a logic 1), this pin becomes the sleep/pwrdn# pin in the qfn-32 pack - age. when 16/68# pin is at logic 1, 16 or intel mode, the device will oper - ate in the intel bus type of interface. when 16/68# pin is at logic 0, 68 or motorola mode, the device will operate in the motorola bus type of interface. this pin does not have an internal pull-up or pull-down resistor. a2 a1 a0 29 30 31 38 39 40 46 47 48 i address lines [2:0]. these 3 address lines select the internal regis - ters in uart channel during a data bus transaction. in the vlio bus mode (details on next page): a2 becomes enir# a1 becomes enrs485# in the qfn-32 package a1 is an unused input on the tqfp-48 and qfn-40 packages and should be connected to gnd a0 becomes lla# d7 d6 d5 d4 d3 d2 d1 d0 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 2 9 8 7 6 5 4 3 2 i/o data bus lines [7:0] (bidirectional). in the vlio bus mode, d7:d0 becomes ad7:ad0. ior# 13 16 10 i when 16/68# pin is at logic 1, t he intel bus interface is selected and this input becomes read strobe (active low). the falling edge insti - gates an internal read cycle and retrieves the data byte from an internal register pointed by the address lines [a2:a0], puts the data byte on the data bus to allow the host processor to read it on the ris - ing edge. when 16/68# pin is at logic 0, the motorola bus interface is selected and this input should be connected to vcc. iow# (r/w#) 14 17 11 i when 16/68# pin is at logic 1, it selects intel bus interface and this input becomes write strobe (active lo w). the falling edge instigates the internal write cycle and the ri sing edge transfer s the data byte on the data bus to an internal register pointed by the address lines. when 16/68# pin is at logic 0, the motorola bus interface is selected and this input becomes read (logic 1) and write (logic 0) signal. cs# 15 18 12 i this input is chip select (active low) to enable the device.
xr16m890 6 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 int (irq#) 10 12 15 o (od) when 16/68# pin is at logic 1 for intel bus interface, this output become the active high device inte rrupt output. the output state is defined by the user through the software setting of mcr[3]. int is set to the active mode when mcr[3] is set to a logic 1. int is set to the three state mode when mcr[3] is set to a logic 0. see mcr[3]. when 16/68# pin is at logic 0 for mo torola bus interface, this output becomes the active low device in terrupt output (open drain). an external pull-up resistor is required for proper operation. reset (reset#) 9 10 13 i when 16/68# pin is at logic 1 fo r intel bus interface, this input becomes reset (active high). when 16/68# pin is at logic 0 for motorola bus interface, this i nput becomes reset# (active low). a 40 ns minimum active pulse on this pin will reset the internal reg - isters and all outputs of the uart. the uart transmitter output will be held at logic 1, the receiver input will be ignored and outputs are reset during reset period (see uart reset conditions). data bus interface - vlio vlio_en 28 37 45 i vlio bus enable. when vlio_en pin is at logic 0, the bus interface is selected by the 16/68# pin. wh en vlio_en pin is at logic 1, the vlio bus interface is enabled an d the 16/68# pin has no effect. ad7 ad6 ad5 ad4 ad3 ad2 ad1 ad0 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 2 9 8 7 6 5 4 3 2 i/o multiplexed address/data lines [7 :0]. the register address is latched on the rising edge of the lla#. after the lla# signal goes high, the uart enters the data phase where the data is placed on these lines. ior# 13 16 10 i read strobe (active low). the falling edge instigates an internal read cycle and retrieves the data by te from an internal register pointed by the latched address. the uart places the data byte on the data bus to allow the host processor to read it on the rising edge. iow# 14 17 11 i write strobe (active low). the fall ing edge instigates the internal write cycle and the rising edge transf ers the data byte on the data bus to an internal register po inted by the latched address. cs# 15 18 12 i chip select (active low). the falling edge starts the access to the uart. a read or write is determined by the ior# and iow# sig - nals. lla# 31 40 48 i latch lower address (active low). the register address is latched on the rising edge of the lla# signal. after the lla# goes high, the device enters the data phase w here the data is placed on the ad[7:0] lines. in the intel/motorola m ode, this pin becomes a0. pin description n ame qfn-32 p in # qfn-40 pin# tqfp-48 pin# t ype d escription
xr16m890 7 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters int 10 12 15 o interrupt output (active high). the out put state is defined by the user through the software setting of m cr[3]. int is set to the active mode when mcr[3] is set to a logic 1. int is set to the three state mode when mcr[3] is set to a logic 0. see mcr[3]. modem i/o and gpios tx 17 32 40 o uart transmit data or infrared encoder data. standard transmit and receive interface is enabled when mcr[6] = 0. in this mode, the tx signal will be a logic 1 during reset or idle (no data). infrared irda transmit and receive interfac e is enabled when mcr[6] = 1. in the infrared mode, the inactive state (no data) for the infrared encoder/decoder interface is a logic 0. if it is not used, leave it unconnected. rx 18 33 41 i uart receive data or infrared receive data. normal receive data input must idle at logic 1 conditio n. the infrared receiver idles at logic 0. this input should be connected to vcc when not used. rts# 19 31 39 o uart request-to-send (active low) or general purpose output. this output must be asserted prior to using auto rts hw flow control, see efr[6], mcr[1] and ier[6]. this output can also be used for the auto rs-485 half-duplex output control. cts# 16 30 38 i uart clear-to-send (active low) or general purpose input. it can be used for auto cts flow control, see efr[7], msr[4] and ier[7]. this input should be connected to vcc when not used. dtr#/gpio0 24 29 37 i/o general purpose i/o or uart data-terminal-ready (active low). dsr#/gpio1 23 28 36 i/o general purpose i/o or uart data-set-ready (active low). cd#/gpio2 22 27 35 i/o general purpose i/o or uart carrier-detect (active low). ri#/gpio3 21 26 34 i/o general purpose i/o or uart ring-indicator (active low). gpio4 gpio5 gpio6 gpio7 - - - - 23 22 21 20 28 27 26 25 i/o i/o i/o i/o general purpose i/os. these gpios are only available on the qfn-40 and tqfp-48 pack - ages. gpio8 gpio9 gpio10 gpio11 gpio12 gpio13 gpio14 gpio15 - - - - - - - - - - - - - - - - 19 20 21 22 23 29 30 31 i/o i/o i/o i/o i/o i/o i/o i/o general purpose i/os. these gpios are only available on the tqfp-48 package. ancillary signals xtal1 26 35 43 i crystal or external clock input. no te: this input is not 5v tolerant. xtal2 27 36 44 o crystal or buffered clock output. pin description n ame qfn-32 p in # qfn-40 pin# tqfp-48 pin# t ype d escription
xr16m890 8 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 pin type: i=input, o=output, i/o= input/output, od=output open drain. en485# 30 13 16 i enable auto rs-485 half-duplex mode. this pin is sampled upon power-up. if this pin is high, th en the rts# output can be used for auto rts hardware flow control or as a general purpose output. if this pin is low, then the rts# output is the auto rs-485 half- duplex direction control pin. in the qfn-32 package, this pin is the a1 pin when in the intel/ motorola mode. enir# 29 38 46 i enable ir mode. this pin is sampled upon power-up. if this pin is high, then the tx output and rx input will behave as the uart transmit data output and uart receive data input. if this pin is low, then the tx output and rx in put will behave as the infrared encoder data output and the infrared receive data input. in the intel/motorola mode, this pin is the a2 pin for all packages. sleep/ pwrdn# (16/68#) 32 11 14 i/o sleep / power down pin. this pin powers up as the sleep input. the sleep input can force the uart to enter into the sleep mode after the next byte transmitted or received without meeting any of the sleep mode conditions. see ?section 1.20.2, sleep mode - sleep pin? on page 25. this pin can also be configured as an output pin which can be used to indicate to the cpu that the uart has entered the sleep mode. this output can also be used to power down other devices. in the qfn-32 package, this pin is the 16/68# input pin when the vlio mode is disabled. vcc_core 25 34 42 pwr 1.62v to 3.63v vcc for the core. this supply voltage is used for the core logic including the crystal oscillator circuit. vcc_bus 12 15 18 pwr 1.62v to 3.63v vcc for bus interface signals. this supply voltage pin will determi ne the i/o levels of the cpu bus interface signals. vcc_uart 20 24 32 pwr 1.62v to 3.63v vcc for the uart signals. this supply voltage pin will determine the i/o levels of the uart i/o signals including gpio[3:0]. vcc_gpio - 19 24 pwr 1.62v to 3.63v vcc for the gpio signals. this supply voltage pin will determine the i/o levels of the gpio[15:4] signals. gnd 11 14, 25 17, 33 pwr power supply common, ground. gnd center pad center pad center pad pwr the center pad on the backside of the qfn package is metallic and should be connected to gnd on the pcb. the thermal pad size on the pcb should be the approximate size of this center pad and should be solder mask defined. the solder mask opening should be at least 0.0025" inwards from the edge of the pcb thermal pad. pin description n ame qfn-32 p in # qfn-40 pin# tqfp-48 pin# t ype d escription
xr16m890 9 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 1.0 functional descriptions 1.1 cpu interface there are 3 cpu interfaces that can be selected on th e xr16m890. they are the intel, motorola and vlio bus interfaces. note: no clock (crystal or external cloc k) is required for data bus tr ansactions. each bus cycle is asynchronous. 1.1.1 intel bus interface (16 mode) the intel bus interface consists of 8 data bits, 3 addr ess lines and 3 control signals (cs#, ior# and iow#) for data bus read/write transactions. in this mode, the inte rrupt output (int) is active high. a typical data bus interconnection is shown in figure 4 . f igure 4. xr16m890 t ypical i ntel d ata b us i nterconnection vcc_bus vcc_bus a0 a1 a2 uart_cs# uart_ior# uart_iow# cs# ior # io w # uart_int in t gnd uart_reset reset 16/68# ri# cd# dsr# cts# rts# dtr# rx tx sleep/pwrdn d0 d1 d2 d3 d4 d5 d6 d7 d0 d1 d2 d3 d4 d5 d6 d7 a0 a1 a2 serial transceivers of rs-232 rs-485 rs-422 o r infrared sleep/pwrdn vlio_en 1.1.2 motorola bus interface (68 mode) the motorola bus interface is similar to the intel bu s interface. this interface consists of 8 data bits, 3 address lines, but only 2 control signals (cs# and r/w#) for data bus read/write transactions. in this mode, the interrupt output (irq#) is an open-drain and active lo w. a typical data bus interconnection is shown in figure 5 . f igure 5. xr16m890 t ypical m otorola d ata b us i nterconnections vcc_bus vcc_bus a0 a1 a2 uart_cs# r/w# d0 d1 d2 d3 d4 d5 d6 d7 a0 a1 a2 cs# d0 d1 d2 d3 d4 d5 d6 d7 io r # io w # uart_irq# ir q # gnd uart_reset# reset# ri# cd# dsr# cts# rts# dtr# rx tx vcc vlio_en vcc serial transceivers of rs-232 rs-485 rs-422 or infrared 16/68# sleep/pwrdn sleep/pwrdn
xr16m890 10 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 1.1.3 vlio bus interface the vlio bus interface is similar to the intel bus interface. the only difference is that the address and data lines are shared. a typical data bus interconnection is shown below in figure 6 . f igure 6. xr16m890 t ypical vlio d ata b us i nterconnections uart_cs# uart_ior# uart_iow# cs# ior# iow # uart_int int gnd uart_reset# reset# ri# cd# dsr# cts# rts# dtr# rx tx ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 serial transceivers of rs-232 rs-485 rs-422 or infrared ad0 ad1 ad2 ad3 ad4 ad5 ad6 ad7 vcc_bus vcc_bus vlio_en sleep/pwrdn sleep/pwrdn lla # lla#
xr16m890 11 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 1.2 serial interface the m890 is typically used with rs-232, rs-485 and ir transceivers. the following figure shows typical connections from the uart to the different transceivers. for more information on rs-232 and rs-485/422 transceivers, go to www.exar.com or send an e-mail to uarttechsupport@exar.com. f igure 7. xr16m890 t ypical s erial i nterface c onnections vcc_uart vcc_uart rs-485 full-duplex serial interface gnd cd # dsr# cts# dtr# rts# rx tx di ro uart rs-485 transceiver full-duplex tx+ tx- rx+ rx- ri # nc nc vcc_uart de re# vcc_uart vcc_uart vcc_uart rs-232 full-modem serial interface gnd ri# cd# dsr# cts# rts# dtr# rx tx t1in r1out t2in t3in r2out r3out r4out r5out gnd uart rs-232 transceiver
f igure 8. xr16m890 t ypical s erial i nterface c onnections vcc_uart vcc_uart rs-485 half-duplex serial interface gnd cd # dsr# cts# dtr# rts# rx tx di ro uart rs-485 transceiver half-duplex y z a b ri # nc vcc_uart de re# vcc_uart vcc_uart infrared connection gnd ri# cd# dsr# cts# rts# dtr# rx tx txd rxd uart ir transceiver vcc_uart nc nc xr16m890 12 uart with 128-byte fifo and integrated level shifters rev. 1.0.0
xr16m890 13 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 1.3 device reset the reset (reset#) input resets the internal registers an d the serial interface out puts to their default state (see table 19 ). an active high (reset) or active low (reset#) pulse of longer than 40 ns duration will be required to activate the reset functi on in the device. following a power-on reset or an external reset, the m890 is software compatible with previous generation of uarts. 1.4 5-volt tolerant inputs the m890 can accept and withstand 5v signals on the in puts without any damage. but note that if the supply voltage for the m890 is at the lower end of the supply voltage range (ie. 1.8v), its v oh may not be high enough to meet the requirements of the v ih of a cpu or a serial transceiver that is operating at 5v. caution: xtal1 is not 5 volt tolerant. 1.5 internal registers the m890 has a set of 16550 compatible registers for controlling, monitoring and data loading and unloading. these registers function as data holding registers (thr/r hr), interrupt status and co ntrol registers (isr/ier), a fifo control register (fcr), receive line status and control registers (lsr/lcr), modem status and control registers (msr/mcr), programmable data rate (clock) divi sor registers (dll/dlm/dld), and a user accessible scratchpad register (spr). beyond the general 16c550 fe atures and capabilities, t he m890 offers enhanced fe ature registers (efr, xon1/ xoff 1, xon2/xoff 2, dld, fctr, emsr, fc and trig, sfr, shr, gpioint, gpio3t, gpioinv, gpiosel) that provide automatic rts and cts hardware flow contro l, automatic xon/xoff software flow control, 9-bit (multidrop) mode, auto rs-485 half duplex control, diff erent baud rate for tx and rx and fractional baud rate generator. all the register functions are discussed in full detail later in ?section 2.0, uart internal registers? on page 27 . 1.6 int ouput the interrupt outputs change according to the operating mode and enhanced features setup. table 1 and 2 summarize the operating behavior for the transmitter and receiver. also see figure 26 through 29 . t able 1: i nterrupt p in o peration for t ransmitter fcr b it -0 = 0 (fifo d isabled ) fcr b it -0 = 1 (fifo e nabled ) int pin (intel or vlio mode) low = one byte in thr high = thr empty low = fifo above trigger level high = fifo below trigger level or fifo empty irq# pin (motorola mode) high = one byte in thr low = thr empty high = fifo above trigger level low = fifo below trigger level or fifo empty t able 2: i nterrupt p in o peration for r eceiver fcr b it -0 = 0 (fifo d isabled ) fcr b it -0 = 1 (fifo e nabled ) int pin (intel or vlio mode) high = one byte in rhr low = rhr empty low = fifo below trigger level high = fifo above trigger level or rx data timeout irq# pin (motorola mode) high = one byte in thr low = rhr empty high = fifo above trigger level low = fifo above trigger level or rx data timeout
xr16m890 14 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 1.7 crystal oscillator or external clock input the m890 includes an on-chip oscillato r to produce a clock for the baud rate generators in t he device when a crystal is connected between xt al1 and xtal2 as show below. the cpu data bus does not require this clock for bus operation. the crystal oscillator provides a system clock to the baud rate gene rators (brgs) in the uart. xtal1 is the input to the oscillator or external clock buffer input with xtal2 pin being the output. for programming details, see ?section 1.8, programmable baud rate generator with fractional divisor? on page 15 . f igure 9. t ypical c rystal c onnections c1 22-47pf c2 22-47pf y1 1.8432 mhz to 24 mhz r1 0-120 (optional) r2 500k - 1m xtal1 xtal2 the on-chip oscillator is designed to use an industry standard micropro cessor crystal (p arallel resonant, fundamental frequency with 10-22 pf capacitance load, esr of 20-120 ohms and 100ppm frequency tolerance) connec ted externally be tween the xtal1 and xtal2 pins. typical oscillator connections are shown in figure 9 . alternatively, an external clock can be connected to the xtal1 pin to clock the internal baud rate generator for st andard or custom rates. for fu rther reading on oscillator circui t, see applicati on note dan108 on exar?s web site.
xr16m890 15 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 1.8 programmable baud rate generator with fractional divisor the m890 has independent baud rate generators (brgs) with prescalers for the transmitter and receiver. the prescalers are controlled by a software bit in the m cr register. the mcr register bit-7 sets the prescalers to divide the input crystal or external clock by 1 or 4. the output of the prescaler clocks to the brg. the brg further divides this clock by a programmable divisor between 1 and (2 16 - 0.0625) in increments of 0.0625 (1/ 16) to obtain a 16x or 8x or 4x sampling clock of th e serial data rate. the sampling clock is used by the transmitter for data bit shifting and receiver for data sampling. the brg divisor (dll, dlm, and dld registers) defaults to the value of ?1? (dll = 0x01, dlm = 0x00 and dld = 0x00) during power-on reset. the dll and dlm register s provide the integer part of the divisor and the dld register provides the fractional part of the divisor. the fo ur lower bits of the dld are used to select a value from 0 (for setting 0000) to 0.9375 or 15/16 (for setting 1111). the divisor values can be calculated with the following equations: divisor = (xtal1 clock frequency / prescaler) / (serial data rate * 16), with 16x mode, dld[5:4] = ?00? divisor = (xtal1 clock frequency / prescaler / (serial data rate * 8), with 8x mode, dld[5:4] = ?01? divisor = (xtal1 clock frequency / prescaler / (serial data rate * 4), with 4x mode, dld[5:4] = ?10? integer divisor = trunc (divisor) fractional divisor = divisor - integer divisor dlm = integer divisor / 256 dll = integer divisor & 256 dld = trunc(fractional divisor * 16) the brg divisors can be calculated using the following formulas: in the formulas above, please note that trunc (n) = integer part of n. for example, trunc (5.6) = 5. 1.8.1 fractional brg example for example, if the crystal clock is 24mhz, prescaler is 1, and the sampling mode is 16x, the divisor for a baud rate of 38400bps would be: divisor = (24000000 / 1) / (38400 * 16) = 39.0625 integer divisor = trunc (39.0625) = 39 fractional divisor = 39.0625 - 39 = 0.0625 dlm = 39 / 256 = 0 = 0x00 dll = 39 & 256 = 39 = 0x27 dld = 0.0625 * 16 = 1 = 0x1 table 3 shows the standard data rates available with a 24mhz crystal or external clock at 16x clock rate. if the pre-scaler is used (mcr bit-7 = 1), the output data ra te will be 4 times less than that shown in table 3 . at 8x sampling rate, these data rates would double. and at 4x sampling rate, they would quadruple. also, when using 8x sampling mode, please note that the bit-time will have a jitter (+/- 1/16) whenever the dld is non-zero and is an odd number. 1.8.2 independent tx/rx brg the xr16m890 has two independent sets of tx and rx baud rate generator. see figure 10 . tx and rx can use different baud rates by setting dld, dll and dlm re gister. for example, tx can transmit data to the remote uart at 9600 bps while rx receives data from remote uart at 921.6 kbps. for the baud rate setting, see ?section 3.15, baud rate generator registers (dll, dlm and dld) - read/write? on page 45.
f igure 10. b aud r ate g enerator xtal1 xtal2 / - (default) 16x or 8x or 4x sampling rate clock to transmitter prescaler divide by 1 prescaler divide by 4 mcr bit 7= 0 mcr bit -7=1 crystal osc buffer dll dlm dld[5:0] dll dlm dld[5:0] 16x or 8x or 4x sampling rate clock to receiver dld[7]=0 dld[7]=1 0 1 dld[6] t able 3: t ypical data rates with a 24 mh z crystal or external clock at 16x s ampling required output data rate d ivisor for 16x clock (decimal) dlm p rogram v alue (hex) dll p rogram v alue (hex) dld p rogram v alue (hex) d ata e rror r ate (%) 400 3750 e a6 0 0 2400 625 2 71 0 0 4800 312.5 1 38 8 0 9600 156.25 0 9c 4 0 10000 150 0 96 0 0 19200 78.125 0 4e 2 0 25000 60 0 3c 0 0 28800 52.0833 0 34 1 0.04 38400 39.0625 0 27 1 0 50000 30 0 1e 0 0 57600 26.0417 0 1a 0 0.08 75000 20 0 14 0 0 100000 15 0 f 0 0 115200 13.0208 0 d 0 0.16 153600 9.7656 0 9 c 0.16 200000 7.5 0 7 8 0 225000 6.6667 0 6 a 0.31 230400 6.5104 0 6 8 0.16 250000 6 0 6 0 0 300000 5 0 5 0 0 400000 3.75 0 3 c 0 460800 3.2552 0 3 4 0.16 500000 3 0 3 0 0 750000 2 0 2 0 0 921600 1.6276 0 1 a 0.16 1000000 1.5 0 1 8 0 xr16m890 16 uart with 128-byte fifo and integrated level shifters rev. 1.0.0
xr16m890 17 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 1.9 transmitter the transmitter section comp rises of an 8-bit transmit shift register (tsr) and 128 bytes of fifo which includes a byte-wide transmit holding register (thr) . tsr shifts out every data bit with the 16x/8x/4x internal clock. a bit time is 16/8/4 clock periods. th e transmitter sends the start-bit followed by the number of data bits, inserts the proper parity-bit if enabled, and a dds the stop-bit(s). the stat us of the fifo and tsr are reported in the line status register (lsr bit-5 and bit-6). 1.9.1 transmit holding regi ster (thr) - write only the transmit holding register is an 8-bit register pr oviding a data interface to the host processor. the host writes transmit data byte to the thr to be converted in to a serial data stream including start-bit, data bits, parity-bit and stop-bit(s). the least-si gnificant-bit (bit-0) becomes first data bit to go out. the thr is the input register to the transmit fifo of 12 8 bytes when fifo operation is enabled by fcr bit-0. every time a write operation is made to the thr, the fifo data pointer is automatically bumped to the next sequential data location. 1.9.2 transmitter operation in non-fifo mode the host loads transmit data to thr one character at a time. the thr empty flag (lsr bit-5) is set when the data byte is transferred to tsr. thr flag can generate a transmit empty interrupt (isr bit-1) when it is enabled by ier bit-1. the tsr flag (lsr bit-6) is set when tsr beco mes completely empty. f igure 11. t ransmitter o peration in non -fifo m ode transmit holding register (thr) transmit shift register (tsr) data byte l s b m s b thr interrupt (isr bit-1) enabled by ier bit-1 txnofifo1 16x or 8x or 4x clock ( dld[5:4] )
xr16m890 18 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 1.9.3 transmitter operation in fifo mode the host may fill the transmit fifo with up to 128 bytes of transmit data. the thr empty flag (lsr bit-5) is set whenever the fifo is empty. the thr empty flag can ge nerate a transmit empty interrupt (isr bit-1) when the fifo becomes empty. the transmit empty interrupt is e nabled by ier bit-1. the tsr flag (lsr bit-6) is set when tsr/fifo becomes empty. f igure 12. t ransmitter o peration in fifo and f low c ontrol m ode transmit data shift register (tsr) transmit data byte thr interrupt (isr bit-1) falls below the programmed trigger level and then when becomes empty. fifo is enabled by fcr bit-0=1 transmit fifo 16x or 8x or 4x clock (dld[5:4]) auto cts flow control (cts# pin) auto software flow control flow control characters (xoff1/2 and xon1/2 reg.) txfifo1 1.10 receiver the receiver section contains an 8-bit receive shift re gister (rsr) and 128 bytes of fifo which includes a byte-wide receive holding register (rhr). the rsr us es the 16x/8x/4x clock (d ld[5:4]) for timing. it verifies and validates every bit on the incoming character in the middle of each data bit. on the falling edge of a start or false start bit, an internal receiver counter starts counting at the 16x/8x/4x clock rate. after 8 clocks (or 4 if 8x or 2 if 4x) the start bit pe riod should be at the center of the start bit. at this time the start bit is sampled and if it is still a logic 0 it is validated. evaluatin g the start bit in this manner prevents the re ceiver from assembling a false character. the rest of the data bits and stop bits are sampled and validated in this same manner to prevent false framing. if there were any error(s) , they are reported in the lsr register bits 2-4. upon unloading the receive data byte from rhr, the rece ive fifo pointer is bumped and the error tags are immediately updated to reflect the status of the data byte in rhr register. rhr can generate a receive data ready interrupt upon receiving a character or delay unt il it reaches the fifo trig ger level. furthermore, data delivery to the host is guaranteed by a receive data read y time-out interrupt when data is not received for 4 word lengths as defined by lcr[1:0] plus 12 bits time. this is equivalent to 3.7-4. 6 character times. the rhr interrupt is enabled by ier bit-0. see figure 13 and figure 14 below. 1.10.1 receive holding regi ster (rhr) - read-only the receive holding register is an 8-bit register that holds a receive data byte from the receive shift register. it provides the receive data interface to the host processor. the rhr register is part of the receive fifo of 128 bytes by 11-bits wide, the 3 extra bits are fo r the 3 error tags to be reported in lsr register. when the fifo is enabled by fcr bit-0, the rhr contains the first data character received by the fifo. after the rhr is read, the next character byte is loaded into the rhr and the errors associated with the current data byte are immediately updated in the lsr bits 2-4.
f igure 13. r eceiver o peration in non -fifo m ode receive data shift register (rsr) receive data byte and errors rhr interrupt (isr bit-2) receive data holding register (rhr) rxfifo1 16x or 8x or 4x clock ( dld[5:4] ) receive data characters data bit validation error tags in lsr bits 4:2 f igure 14. r eceiver o peration in fifo and a uto rts f low c ontrol m ode receive data shift register (rsr) rxfifo1 16x or 8x or 4x clock ( dld[5:4] ) error tags (128-sets) error tags in lsr bits 4:2 receive data characters data bit validation receive data fifo receive data receive data byte and errors rhr interrupt (isr bit-2) programmed for desired fifo trigger level. fifo is enabled by fcr bit-0=1 rts# de-asserts when data fills above the flow control trigger level to suspend remote transmitter. enable by efr bit-6=1, mcr bit-1. rts# re-asserts when data falls below the flow control trigger level to restart remote transmitter. enable by efr bit-6=1, mcr bit-1. 128 bytes by 11-bit wide fifo fifo trigger=16 data falls to 8 data fills to 56 example : - rx fifo trigger level selected at 16 bytes (see note below) xr16m890 19 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters
xr16m890 20 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 1.11 auto rts (hardware) flow control automatic rts hardware flow control is used to prevent data overrun to the local receiver fifo. the rts# output is used to request remote unit to suspend/r esume data transmission. the auto rts flow control features is enabled to fit specific application requirement (see figure 15 ): x enable auto rts flow control using efr bit-6. x the auto rts function must be started by asserting rts# output pin (mcr bit-1 to logic 1 after it is enabled). if using the auto rts interrupt: x enable rts interrupt through ier bit-6 (after setting efr bit-4). the uart issues an interrupt when the rts# pin makes a transition from low to high: isr bit-5 will be set to logic 1. 1.12 auto rts hysteresis with the auto rts function enabled, an interrupt is gen erated when the receive fifo reaches the selected rx trigger level. the rts# pin will not be forced high (rts off) until the re ceive fifo reaches one trigger level above the selected trigger level in the trigger table ( table 10 ). the rts# pin will return low after the rx fifo is unloaded to one le vel below the selected trigger level. under the above desc ribed conditions, the m890 will continue to accept data until the receive fifo gets fu ll. the auto rts function is initiated when the rts# output pin is asserted low (rts on). table 4 below explains this when the trigger table-c ( table 10 ) is selected. t able 4: a uto rts (h ardware ) f low c ontrol r x t rigger l evel int p in a ctivation rts# d e - asserted (h igh ) (c haracters in r x f ifo ) rts# a sserted (l ow ) (c haracters in r x f ifo ) 8 8 16 0 16 16 56 8 56 56 60 16 60 60 60 56
xr16m890 21 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 1.13 auto cts flow control automatic cts flow control is used to prevent data overrun to the remote receiver fifo. the cts# input is monitored to suspend/restart the local transmitter. the aut o cts flow control feature is selected to fit specific application requirement (see figure 15 ): x enable auto cts flow control using efr bit-7. if needed, the cts interrupt can be enabled through ier bi t-7 (after setting efr bit-4). the uart issues an interrupt when the cts# pin is de-asserted (high) : isr bit-5 will be set to 1, and uart will suspend transmission as soon as the stop bit of the character in process is shifted out. transmission is resumed after the cts# input is re-asserted (low), indicating more data may be sent. f igure 15. a uto rts and cts f low c ontrol o peration rtsa# ctsb# rxa txb transmitter receiver fifo trigger reached auto rts trigger level auto cts monitor rtsa# txb rxa fifo ctsb# remote uart uartb local uart uarta on off on suspend restart rts high threshold data starts on off on assert rts# to begin transmission 1 2 3 4 5 6 7 receive data rts low threshold 9 10 11 receiver fifo trigger reached auto rts trigger level transmitter auto cts monitor rtsb# ctsa# rxb txa inta (rxa fifo interrupt) rx fifo trigger level rx fifo trigger level 8 12 rtscts1 the local uart (uarta) starts data transfer by asserting rtsa# (1). rtsa# is normally connected to ctsb# (2) of remote uart (uartb). ctsb# allows its transmitter to se nd data (3). txb data arrives and fills uarta receive fifo (4). when rxa data fills up to its receive fifo trigger le vel, uarta activates its rxa data ready interrupt (5) and con - tinues to receive and put data into its fifo. if interrupt se rvice latency is long and data is not being unloaded, uarta monitors its receive data fill level to match the upper thre shold of rts delay and de-assert rtsa# (6). ctsb# follows (7) and request uartb transmitter to suspend data transfer. ua rtb stops or finishes sending the data bits in its trans - mit shift register (8). when receive fifo data in uarta is unloaded to match the lower threshold of rts delay (9), uarta re-asserts rtsa# (10), ctsb# recognizes the change (11) and restarts its transmitter and data flow again until next receive fifo trigger (12). this same event applies to the reverse direction when uarta sends data to uartb with rtsb# and ctsa# controlling the data flow.
xr16m890 22 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 1.14 auto xon/xoff (software) flow control when software flow control is enabled ( see table 18 ), the m890 compares one or two sequential receive data characters with the programmed xon or xoff-1,2 charac ter value(s). if receive character(s) (rx) match the programmed values, the m890 will halt transmission (tx) as soon as th e current characte r has completed transmission. when a match occurs, the xoff (if enabled vi a ier bit-5) flag will be set and the interrupt output pin will be activated. following a suspension due to a ma tch of the xoff character, the m890 will monitor the receive data stream for a match to t he xon-1,2 character. if a match is found, the m890 will resume operation and clear the flags (isr bit-4). reset initially sets the contents of the xon/xoff 8-bit flow control registers to a logic 0. following reset the user can write any xon/xoff value desired for software flow c ontrol. different conditions can be set to detect xon/ xoff characters ( see table 18 ) and suspend/resume transmissions. when double 8-bit xon/xoff characters are selected, the m890 compares two consecutive rece ive characters with two software flow control 8-bit values (xon1, xon2, xoff1, xoff2) and controls tx tran smissions accordingly. under the above described flow control mechanisms, flow control charac ters are not placed in the rx fifo. in the event that the receive buffer is overfilling and flow cont rol needs to be executed , the m890 au tomatically sends an xoff message (when enabled) via the serial tx output to the remote modem. the m890 sends the xoff-1,2 characters two-character-times (= time taken to send two characters at the programmed baud rate) after the receive fifo crosses the prog rammed trigger level. to clear this condition, the m890 will transmit the programmed xon-1,2 characters as soon as receive fifo is less than one trigge r level below the programmed trigger level. table 5 below explains this when the trigger table-c ( table 10 ) is selected. t able 5: a uto x on /x off (s oftware ) f low c ontrol rx t rigger l evel int p in a ctivation x off c haracter ( s ) s ent ( characters in rx fifo ) x on c haracter ( s ) s ent ( characters in rx fifo ) 8 8 8* 0 16 16 16* 8 56 56 56* 16 60 60 60* 56 * after the trigger level is reached, an xoff character is s ent after a short span of time (= time required to send 2 characters); for example, after 2.083ms has elapsed for 9600 baud and 10-bit word length setting. 1.15 special character detect a special character detect feature is provided to detect an 8-bit character when bit-5 is set in the enhanced feature register (efr). when this character (xoff2) is detected, it will be placed in the fi fo along with normal incoming rx data. the m890 compares each incoming rece ive character with xoff-2 data. if a match exists, the received data will be transferred to the rx fi fo and isr bit-4 will be set to indicate de tection of special ch aracter. although the internal register table shows xon, xoff registers with ei ght bits of character information, the actual number of bits is dependent on the programmed word length. line cont rol register (lcr) bits 0-1 defines the number of character bits, i.e., either 5 bits, 6 bits, 7 bits, or 8 bits. the word length selected by lcr bits 0-1 also determines the number of bits that will be used for the special character comparison. bit-0 in the xon, xoff registers corresponds with the ls b bit for the receive character. 1.16 auto rs485 half-duplex control operation the auto rs485 half-duplex direction control feature ca n be enabled by fctr bit [3]. the rts# pin becomes the half-duplex control output when this feature has been enabled. the rts# pin is typically connected to both the driver enable (de) and re ceiver enable (re) of an rs-485 transcei ver. when the transmitter is idle, the rts# pin is de-asserted so that the rs-485 driver is disabled and the rs-485 receiver is enabled. when data is loaded into the tx fifo, the rts# pin is asserted to enable the rs-485 driver and disable the rs-485 receiver. this changes the tr ansmitter empty interrupt to tsr empty instead of thr empty.
xr16m890 23 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 1.16.1 rs-485 setup time by default, the rts# pin is asserted i mmediately before there is data on t he tx output pin. for faster baud rates, it may be possible that data is lost due to a long start-up time for an rs-485 transceiver. the m890 can delay the data from 0-15 bit times to allow the rs-485 transceiver to start up ( see ?section , shr[7:4]: rs- 485 setup delay? on page 40. ). 1.16.2 rs-485 turn-around delay at the end of sending data, the rts# pin is de-asserted immediately after the tx pin goes idle. the rts# pin can be programmed to delay the rts# from being asserted from 0-15 bit times ( see ?section , shr[3:0]: rs- 485 turn-around delay / auto rts hysteresis? on page 40. ). the delay optimizes the time needed for the last transmission to reach the farthest station on a long cable network before switching off the line driver. 1.17 normal multidrop (9-bit) mode - receiver normal multidrop mode is enabled when sfr[6] = 1 (re quires efr[4] = 1) and efr[5] = 0 (special character detect disabled). the receiver is set to force parity 0 (lcr[5:3] = ?111?) in order to detect address bytes. with the receiver initially di sabled, it ignores all the data bytes (parity bit = 0) until an address byte is received (parity bit = 1). this address byte will cause the uart to set the parity error. the uart will generate an lsr interrupt and place the address byte in the rx fifo. the software then examines the byte and enables the receiver if the address matches its slave address , otherwise, it does not enable the receiver. if the receiver has been enabled, the receiver will receiv e the subsequent data. if an address byte is received, it will generate an lsr inte rrupt. the software again examines the byte and if the addr ess matches its slave address, it does not have to do any thing. if the address does not match its slave address, then the receiver should be disabled. 1.17.1 auto address detection - receiver auto address detection mode is enabled when sfr[6] = 1 (requires efr[4] = 1) and efr bit-5 = 1. the desired slave address will need to be written into the xo ff2 register. the receiver will try to detect an address byte that matches the porgrammed charac ter in the xoff2 register. if the received byte is a data byte or an address byte that does no t match the programmed charac ter in the xoff2 register, the receiver will discard these data. upon receiving an address byte that matches the xoff2 character, the receiver will be automatically enabled if not already enabled, and the address character is pushed into the rx fifo along with the parity bit (in place of the parity error bit). the re ceiver also generates an lsr interrupt. the receiver will then receive the subsequent data. if another address by te is received and this address does not match the programmed xoff2 ch aracter, then the receiver will automatica lly be disabled and the address byte is ignored. if the address byte matches xoff2, the receiver will put this byte in the rx fifo along with the parity bit in the parity error bit. 1.18 multidrop (9-bit) mode - transmitter this feature simplifies sending an address byte (9th bit = 1) and improves the efficiency of the transmit data routine for transmitting 9-bit data. in previous generati on uarts, the only way to send an address byte is by changing the parity to forced 1 parity, load the address byte in the thr, wait for the byte to be transmitted, change the parity back to forced 0 parity, then load data into the tx fifo. in the xr16m890, there?s no waiting required and no changing parity. the transmit routine can set sfr[7]=1, then write the address byte into the tx fifo followed immediately by the data bytes. sfr[7] is self-clearing, ther efore, if multiple address bytes need to be transmitted, then sfr[7] will need to be set prior to each address byte written into the tx fifo. during initialization, th e parity must be set to force parity 0 (lcr[5:3] = ?111?).
xr16m890 24 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 1.19 infrared mode the m890 uart includes the infrared encoder and decoder compatible to the irda (i nfrared data association) version 1.0 and 1.1. the irda 1.0 standard that stipulates the infrared encoder sends out a 3/16 of a bit wide high-pulse for each ?0? bit in the tr ansmit data stream with a data rate up to 115.2 kbps. for the irda 1.1 standard, the infrared encoder sends out a 1/4 of a bit time wide high-pulse for each "0" bit in the transmit data stream with a data rate up to 1.152 mbps. this signa l encoding reduces the on-time of the infrared led, hence reduces the power consumption. see figure 16 below. the infrared encoder and decoder are enabled by setting mc r register bit-6 to a ?1?. with this bit enabled, the infrared encoder and decoder is compatible to the irda 1.0 standard. for the infrared encoder and decoder to be compatible to the irda 1. 1 standard, sfr bit-3 will also need to be se t to a ?1? when efr bi t-4 is set to ?1?. likewise, the rx input assumes an idle level of logic zero from a reset and power up, see figure 16 . typically, the wireless infrared decoder receives the input pulse from the infrared sensing diode on the rx pin. each time it senses a light pulse, it returns a logic 1 to the data bit stream. f igure 16. i nfrared t ransmit d ata e ncoding and r eceive d ata d ecoding character data bits start stop 0000 0 11 111 bit time 1/16 clock delay irdecoder-1 rx data receive ir pulse (rx pin) character data bits start stop 0000 0 11 111 tx data transmit ir pulse (tx pin) bit time 1/2 bit time 3/16 or 1/4 bit time irencoder-1
xr16m890 25 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 1.20 sleep mode with auto wake-up the m890 supports low voltage system designs, hence, a sleep mode with auto wake-up feature is included to reduce its power consumption when the chip is not actively used. 1.20.1 sleep mode - ier bit-4 all of these conditions must be satisf ied for the m890 to enter sleep mode: no interrupts pending (isr bit-0 = 1) sleep mode is enabled (ier bit-4 = 1) modem inputs are not toggling (msr bits 0-3 = 0) rx input pin is idling high in norm al mode or low in infrared mode divisor is non-zero tx and rx fifos are empty the m890 stops its crystal oscillator to conserve power in the sleep mode. user can check the xtal2 pin for no clock output as an indication that the device has entered the sleep mode. the m890 resumes normal operation by any of the following: a receive data start bit transition (high to low) a data byte is loaded to the transmitter, thr or fifo a change of logic state on any of the modem or general purpose serial inputs: cts#, dsr#, cd#, ri# if the m890 is awakened by any one of the above conditio ns, it will return to the sle ep mode automatically after all interrupting conditions have been serviced and cl eared. if the m890 is awak ened by the modem inputs, a read to the msr is required to re set the modem inputs. in any case, t he sleep mode will not be entered while an interrupt is pending from any channel. the m890 will stay in the sleep mode of op eration until it is disabled by setting ier bit-4 to a logic 0. a word of caution: owing to the star ting up delay of the crystal oscillato r after waking up from sleep mode, the first few receive characters may be lost. also, make su re the rx pin is idling high or ?marking? condition during sleep mode. this may not occur when the external interface transceivers (rs-232, rs-485 or another type) are also put to sleep mode and cannot maintain t he ?marking? condition. to avoid this, the system design engineer can use a 47k ohm pull-up resistor on each of the rx input. 1.20.2 sleep mode - sleep pin the m890 has a new pin call ed the sleep pin that can be used instead of setting ier bit-4=1. the m890 will enter the sleep mode when: the current byte in the tsr has completely shifted out the current byte in the rsr has been completely received under this condition, there could be data in the tx and rx fifos. any data that is the tx and rx fifos when the sleep pin is asserted will not be af fected. the only data that will be lost is any data that is still being received on the rx pin. the m890 will only wake up after the sleep pin has been de-asserted. 1.20.3 wake-up interrupt the m890 has the wake up interrupt. by setting the fcr bit-3, wake up interrupt is enabled or disabled. the default status of wake up interrupt is disabled. please see ?section 3.5, fifo control register (fcr) - write-only? on page 34.
xr16m890 26 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 1.21 internal loopback the m890 uart provides an inter nal loopback capability for system diagnostic purposes. the internal loopback mode is enabled by setting mcr register bit-4 to logi c 1. all regular uart functions operate normally. figure 17 shows how the modem port signals are re-configured. transmit data from the transmit shift register output is internally routed to the receive shift register input allowing the system to re ceive the same data that it was sending. the tx pin is held high or mark condition while rts# and dtr# are de-asserted, and cts#, dsr# cd# and ri# inputs are ignored. caution: the rx input must be held high during loopback test else upon exiting the loopback test the uart may detect and report a false ?break? signal. f igure 17. i nternal l oopback tx rx modem / general purpose control logic internal data bus lines and control signals rts# mcr bit-4=1 vcc vcc transm it shift register (thr/fifo) receive shift register (rhr/fifo) cts# dtr# dsr# ri# cd# op1# rts# cts# dtr# dsr# ri# cd# vcc op2#
xr16m890 27 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 2.0 uart internal registers the complete register set for the m890 is shown in table 6 and table 7 . t able 6: uart internal registers r egister r ead /w rite c omments 16c550 c ompatible r egisters 0 0 0 drev - device revision read-only lcr[7] = 1, lcr z 0xbf, dll = 0x00, dlm = 0x00 0 0 1 dvid - device identification register read-only 0 0 0 dll - divisor lsb register read/write lcr[7] = 1, lcr z 0xbf see dld[7:6] 0 0 1 dlm - divisor msb register read/write 0 1 0 dld - divisor fractional register read/write lcr[7] = 1, lcr z 0xbf, efr[4] = 1 0 0 0 rhr - receive holding register thr - transmit holding register read-only write-only lcr[7] = 0 0 0 1 ier - interrupt enable register read/write 0 1 0 isr - interrupt status register fcr - fifo control register read-only write-only lcr[7] = 0 if efr[4] = 1 or lcr z 0xbf if efr[4] = 0 0 1 1 lcr - line control register read/write 1 0 0 mcr - modem control register read/write lcr z 0xbf 1 0 1 lsr - line status register read-only 1 0 1 shr - setup/hysteresis register write-only 1 1 0 msr - modem status register read-only 1 1 0 sfr - special function register write-only lcr z 0xbf efr[4] = 1 1 1 1 spr - scratch pad register read/write lcr z 0xbf, fctr[6] = 0, sfr[0] = 0 1 1 1 emsr - enhanced mode select register write-only lcr z 0xbf, fctr[6] = 1, sfr[0] = 0 1 1 1 fc - rx/tx fifo level counter register read-only e nhanced r egisters 0 0 0 fc - rx/tx fifo level counter register read-only lcr = 0xbf 0 0 0 trig - rx/tx fifo trigger level register write-only 0 0 1 fctr - feature control register read/write 0 1 0 efr - enhanced function register read/write 1 0 0 xon-1 - xon character 1 read/write lcr = 0xbf sfr[0]=0 1 0 1 xon-2 - xon character 2 read/write 1 1 0 xoff-1 - xoff character 1 read/write 1 1 1 xoff-2 - xoff character 2 read/write 1 0 0 gpioint - gpio interrupt enable register read/write lcr = 0xbf sfr[0]=1 1 0 1 gpio3t - gpio three-state control register read/write 1 1 0 gpioinv - gpio polarity control register read/write 1 1 1 gpiosel - gpio select register read/write a2 a1 a0
xr16m890 28 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 t able 7: internal registers description. s haded bits are enabled when efr b it -4=1 a ddress a2-a0 r eg n ame r ead / w rite b it -7 b it -6 b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 c omment 16c550 compatible registers 0 0 0 rhr rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 0 0 0 0 thr wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 0 0 1 ier rd/wr 0/ 0/ 0/ 0/ modem stat. int. enable rx line stat. int. enable tx empty int enable rx data int. enable cts# int. enable rts# int. enable xoff int. enable sleep mode enable 0 1 0 isr rd fifos enabled fifos enabled 0/ 0/ int source bit-3 int source bit-2 int source bit-1 int source bit-0 lcr[7] = 0 if efr[4]=1 or lcr 0xbf if efr[4]=0 rts cts interrupt xoff interrupt 0 1 0 fcr wr rx fifo trigger rx fifo trigger tx fifo trigger tx fifo trigger wake up int enable tx fifo reset rx fifo reset fifos enable 0 1 1 lcr rd/wr divisor enable set tx break set parity even parity parity enable stop bits word length bit-1 word length bit-0 1 0 0 mcr rd/wr 0/ 0/ 0/ internal lopback enable int out - put enable (op2#) op1#/ rts# output control dtr# output control lcr 0xbf brg pres - caler ir mode enable xonany gpio select 1 0 1 lsr rd rx fifo global error thr & tsr empty thr empty rx break rx fram - ing error rx parity error rx over - run error rx data ready 1 0 1 shr wr rs-485 setup bit-3 rs-485 setup bit-2 rs-485 setup bit-1 rs-485 setup bit-0 rs-485 delay bit-3/ hystere - sis bit-3 rs-485 delay bit-2/ hyster - esis bit-2 rs-485 delay bit-1/ hyster - esis bit-1 rs-485 delay bit-0/ hystere - sis bit-0 1 1 0 msr rd cd# input ri# input dsr# input cts# input delta cd# delta ri# delta dsr# delta cts# 1 1 0 sfr wr tx 9-bit enable 9-bit mode disable rx disable tx fast ir gpio int enable gpio [15:8]/ [7:0] select gpio access 1 1 1 spr rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr 0xbf fctr[6]=0 sfr[0]=0 1 1 1 gpiolvl rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 lcr 0xbf fctr[6]=0 sfr[0]=1
xr16m890 29 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 1 1 1 emsr wr xoff interrupt mode select lsr interrupt mode select rsvd modem 3-state control invert rts in rs485 mode send tx imme - diate fifo count control bit-1 fifo count control bit-0 lcr 0xbf fctr[6]=1 sfr[0]=0 1 1 1 fc rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 baud rate generator divisor 0 0 0 drev rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 1 lcr 0xbf dll= 0x00 dlm= 0x00 0 0 1 dvid rd 0 0 0 1 0 0 0 1 0 0 0 dll rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr[7] = 1 lcr 0xbf dld[7:6] 0 0 1 dlm rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 0 1 0 dld rd/wr brg select enable indepen - dent brg 4x mode 8x mode bit-3 bit-2 bit-1 bit-0 lcr[7] = 1 lcr 0xbf efr[4] = 1 enhanced registers 0 0 0 fc rd bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr=0 x bf 0 0 0 trig wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 0 0 1 fctr rd/wr rx/tx select swap spr trigger ta b l e bit-1 trigger ta b l e bit-0 auto rs485 half- duplex invert rx ir rsvd pwrdn # control 0 1 0 efr rd/wr auto cts# enable auto rts# enable special char select enable ier [7:4], isr [5:4], fcr[5:3], mcr[7:5], dld, shr, sfr soft- ware flow cntl bit-3 soft - ware flow cntl bit-2 soft - ware flow cntl bit-1 soft - ware flow cntl bit-0 1 0 0 xon1 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 lcr=0 x bf sfr[0]=0 1 0 1 xon2 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 0 xoff1 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 1 1 xoff2 rd/wr bit-7 bit-6 bit-5 bit-4 bit-3 bit-2 bit-1 bit-0 1 0 0 gpioint rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 lcr=0 x bf sfr[0]=1 1 0 1 gpio3t rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 1 1 0 gpioinv rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 1 1 1 gpiosel rd/wr bit-15/ bit-7 bit-14/ bit-6 bit-13/ bit-5 bit-12/ bit-4 bit-11/ bit-3 bit-10/ bit-2 bit-9/ bit-1 bit-8/ bit-0 t able 7: internal registers description. s haded bits are enabled when efr b it -4=1 a ddress a2-a0 r eg n ame r ead / w rite b it -7 b it -6 b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 c omment
xr16m890 30 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 3.0 internal register descriptions 3.1 receive holding register (rhr) - read- only see?receiver? on page 18. 3.2 transmit holding register (thr) - write-only see?transmitter? on page 17. 3.3 interrupt enable register (ier) - read/write the interrupt enable register (ier) masks the interrupts from receive data ready, transmit empty, line status and modem status registers. these interrupts are r eported in the interrupt status register (isr). 3.3.1 ier versus receive fifo interrupt mode operation when the receive fifo (fcr bit-0 = 1) and receive inte rrupts (ier bit-0 = 1) are enabled, the rhr interrupts (see isr bits 2 and 3) status will reflect the following: a. the receive data available interrupts are issued to the host when the fifo has reached the programmed trigger level. it will be cleared when the fifo drops below the programmed trigger level. b. fifo level will be reflected in the isr register when the fifo trigger level is reached. both the isr register status bit and the interrupt will be cleared wh en the fifo drops below the trigger level. c. the receive data ready bit (lsr bit-0) is set as soon as a character is transferred from the shift register to the receive fifo. it is rese t when the fifo is empty. 3.3.2 ier versus receive/transmit fifo polled mode operation when fcr bit-0 equals a logic 1 for fifo enable; rese tting ier bits 0-3 enables the xr16m890 in the fifo polled mode of operation. since the receiver and transmitter have separate bits in the lsr either or both can be used in the polled mode by selecting respective transmit or receive control bit(s). a. lsr bit-0 indicates there is data in rhr or rx fifo. b. lsr bit-1 indicates an overrun error has occurred and that data in the fifo may not be valid. c. lsr bit 2-4 provides the type of receive data erro rs encountered for the data byte in rhr, if any. d. lsr bit-5 indicates thr is empty. e. lsr bit-6 indicates when both the transmit fifo and tsr are empty. f. lsr bit-7 indicates a data error in at least one character in the rx fifo. ier[0]: rhr interrupt enable the receive data ready interrupt will be issued when rhr has a data character in th e non-fifo mode or when the receive fifo has reached the programmed trigger level in the fifo mode. ? logic 0 = disable the receive data ready interrupt (default). ? logic 1 = enable the receiver data ready interrupt. ier[1]: thr interrupt enable this bit enables the transmit ready interrupt which is issued whenever the thr becomes empty in the non- fifo mode or when data in the fifo fa lls below the programmed trigger level in the fifo mode. if the thr is empty when this bit is enabled , an interrupt will be generated. ? logic 0 = disable transmit ready interrupt (default). ? logic 1 = enable transmit ready interrupt.
xr16m890 31 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters ier[2]: receive line status interrupt enable if any of the lsr register bits 1, 2, 3 or 4 is a logic 1, it will generate an interrupt to inform the host controller about the error status of the current data byte in fifo . lsr bit-1 generates an interrupt immediately when an overrun occurs. lsr bits 2-4 generate an interrupt when the character in the rhr has an error. however, when emsr bit-6 changes to 1 (default is 0), lsr bit 2-4 generate an interrupt when the character is received in the rx fifo. please refer to ?section 3.14, enhanced mode select register (emsr) - write-only? on page 44 . ? logic 0 = disable the receiver line status interrupt (default). ? logic 1 = enable the receiver line status interrupt. ier[3]: modem status interrupt enable ? logic 0 = disable the modem status register interrupt (default). ? logic 1 = enable the modem status register interrupt. ier[4]: sleep mode enable (requires efr[4] = 1) ? logic 0 = disable sleep mode (default). ? logic 1 = enable sleep mode. see sleep mode section for further details. ier[5]: xoff interrupt enable (requires efr[4]=1) ? logic 0 = disable the software flow cont rol, receive xoff interrupt. (default) ? logic 1 = enable the software flow control, receive xoff interrupt. see software flow control section for details. ier[6]: rts# output interrupt enable (requires efr[4]=1) ? logic 0 = disable the rts# interrupt (default). ? logic 1 = enable the rts# interrupt. the uart issues an interrupt when the rts# pin makes a transition from low to high (if enabled by efr bit-6). ier[7]: cts# input interrupt enable (requires efr[4]=1) ? logic 0 = disable the cts# interrupt (default). ? logic 1 = enable the cts# interrupt. the uart issues an interrupt when cts# pin makes a transition from low to high (if enabled by efr bit-7).
xr16m890 32 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 3.4 interrupt status register (isr) - read-only the uart provides multiple levels of prioritized interrupts to minimize external software interaction. the interrupt status register (isr) provides the user with six interrupt status bits. performing a read cycle on the isr will give the user the current hi ghest pending interrupt le vel to be serviced, others are queued up to be serviced next. no other interrupts are acknowledged until the pending interrupt is serviced. the interrupt source table, table 8 , shows the data values (bit 0-5) for the interrupt priority levels and the interrupt sources associated with each of these interrupt levels. 3.4.1 interrupt generation: ? lsr is by any of the lsr bits 1, 2, 3 and 4. ? rxrdy is by rx trigger level. ? rxrdy time-out is by a 4-char plus 12 bits delay timer. ? txrdy is by tx trigger level or tx fifo empty. ? msr is by any of the msr bits 0, 1, 2 and 3. ? receive xon/xoff/special character is by dete ction of a xon, xoff or special character. ? cts# is when the remote tr ansmitter toggles the input pin (from low to high) during auto cts flow control. ? rts# is when its receiver toggles the output pin (f rom low to high) during auto rts flow control. ? wakeup interrupt is generated when the m890 wakes up from the sleep mode. ? gpio interrupt is generated when a gpio input has b een asserted (polarity selected by gpioinv register) 3.4.2 interrupt clearing: ? lsr interrupt is cleared by a read to the lsr register. ? rxrdy interrupt is cleared by reading data until fifo falls be low the trigger level. ? rxrdy time-out interrupt is cleared by reading rhr. ? txrdy interrupt is cleared by a read to the isr register or writing to thr. ? msr interrupt is cleared by a read to the msr register. ? xon or xoff interrupt is cleared by a read to the isr register. ? special character interrupt is cleared by a read to isr register or after next character is received. ? rts# and cts# flow control interrupts are cleared by a read to the msr register. ? wakeup interrupt is cleared by a read to isr register. ? gpio interrupt is cleared by a read to the gpiolvl register ] t able 8: i nterrupt s ource and p riority l evel p riority isr r egister s tatus b its s ource of interrupt l evel b it -5 b it -4 b it -3 b it -2 b it -1 b it -0 1 0 0 0 1 1 0 lsr (receiver line status register) 2 0 0 1 1 0 0 rxrdy (receive data time-out) 3 0 0 0 1 0 0 rxrdy (received data ready) 4 0 0 0 0 1 0 txrdy (transmit ready) 5 0 0 0 0 0 0 msr (modem status register)
xr16m890 33 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters isr[0]: interrupt status x logic 0 = an interrupt is pending and the isr contents ma y be used as a pointer to the appropriate interrupt service routine. x logic 1 = no interrupt pending (default condition). isr[3:1]: interrupt status these bits indicate the source for a pending interrupt at interrupt priority levels (see table 8 ). isr[4]: interrupt status (requires efr bit-4 = 1) this bit is enabled when efr bit-4 is set to a logic 1. is r bit-4 indicates that the receiver detected a data match of the xoff, xon or special character(s). isr[5]: interrupt status (requires efr bit-4 = 1) isr bit-5 indicates that cts# or rts# has changed state from low to high. isr[6]: gpio interrupt status this bit reports the gpio interrupt status. when a gpio interrupt ha s been genera ted, this bit will be the inverse of isr[7]. when the gpio interrupt is not enabled, this bit will match isr[7] for 16550 compatibility (see table 9 ). isr[7]: fifo enable status this bit is set to a logic 0 when the fifos are disabled. it is set to a l ogic 1 when the fifos are enabled (see table 9 ). t able 9: fifo e nable s tatus /gpio i nterrupt s tatus fifo m ode gpio i nterrupt e nabled (gpioint r egister ) gpio i nterrupt s tatus 0 fifo disabled no no gpio interrupt 0 0 0 fifo disabled yes no gpio interrupt 0 0 0 fifo disabled yes gpio interrupt 0 1 1 fifo enabled no no gpio interrupt 1 1 1 fifo enabled yes no gpio interrupt 1 1 1 fifo enabled yes gpio interrupt 1 0 6 0 1 0 0 0 0 rxrdy (received xon, xoff or special character) 7 1 0 0 0 0 0 cts#, rts# change of state - 0 0 0 0 0 1 none (default) or wakeup interrupt fcr[0] isr[7] isr[6] t able 8: i nterrupt s ource and p riority l evel p riority isr r egister s tatus b its s ource of interrupt l evel b it -5 b it -4 b it -3 b it -2 b it -1 b it -0
xr16m890 34 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 3.5 fifo control register (fcr) - write-only this register is used to enable the fifos, clear the fi fos, set the transmit/receive fifo trigger levels, and enable the wake up interrupt. they are defined as follows: fcr[0]: tx and rx fifo enable ? logic 0 = disable the transmit and receive fifo (default). ? logic 1 = enable the transmit and receive fifos. this bit must be set to logic 1 when other fcr bits are written or they will not be programmed. fcr[1]: rx fifo reset this bit is only active when fcr bit-0 is a ?1?. ? logic 0 = no receive fifo reset (default) ? logic 1 = reset the receive fifo pointers and fifo le vel counter logic (the rece ive shift register is not cleared or altered). this bit will return to a logic 0 after resetting the fifo. fcr[2]: tx fifo reset this bit is only active when fcr bit-0 is a ?1?. ? logic 0 = no transmit fifo reset (default). ? logic 1 = reset the transmit fifo pointers and fifo le vel counter logic (the transmit shift register is not cleared or altered). this bit will return to a logic 0 after resetting the fifo. fcr[3]: enable wake up interrupt (requires efr bit-4 = 1) ? logic 0 = disable the wake up interrupt (default). ? logic 1 = enable the wake up interrupt. please refer to ?section 1.20.3, wake-up interrupt? on page 25 . fcr[5:4]: transmit fifo trigger select (requires efr bit-4 = 1) these 2 bits set the trigger level for the transmit fifo. the uart will issue a transmit interrupt when the number of characters in the fifo falls below the selected trigger level, or when it gets empty in case that the fifo did not get filled over the trigger level on last re-load. table 10 below shows the select ions. note that the receiver and the transmitter cannot use different trigge r tables. whichever selecti on is made last applies to both the rx and tx side. fcr[7:6]: receive fifo trigger select these 2 bits are used to se t the trigger level for the receive fifo. th e uart will issue a rece ive interrupt when the number of the characters in the fifo crosses the trigger level. table 10 shows the complete selections. note that the receiver and the transmitter cannot use di fferent trigger tables. whichever selection is made last applies to both the rx and tx side.
t able 10: t ransmit and r eceive fifo t rigger t able and l evel s election t rigger t able b it -5 b it -4 b it -7 b it -6 b it -5 bit -4 r eceive t rigger l evel t ransmit t rigger l evel c ompatibility table-a 0 0 0 0 1 1 0 1 0 1 0 0 1 (default) 4 8 14 1 (default) 16c550, 16x255x, 16x554, 16x57x, 16x58x table-b 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 8 16 24 28 16 8 24 30 16c650a, 16l651, 16x265x, 16x564 table-c 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 8 16 56 60 8 16 32 56 16x654 table-d 1 1 x x x x programmable via trg register. fctr[7] = 0. programmable via trg register. fctr[7] = 1. 16x275x, 16c285x, 16c850, 16c854, 16c864 xr16m890 35 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 3.6 line control register (lcr) - read/write the line control register is used to specify the asynchronous data communication format. the word or character length, the number of stop bits, and the parity are selected by writing the appropriate bits in this register. lcr[1:0]: tx and rx word length select these two bits specify the word length to be transmitted or received. w ord length 0 0 5 (default) 0 1 6 1 0 7 1 1 8 fctr fctr fcr fcr fcr fcr bit-1 bit-0
xr16m890 36 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 lcr[2]: tx and rx stop-bit length select the length of stop bit is specified by this bi t in conjunction with the programmed word length. w ord length s top bit length (b it time ( s )) 0 5,6,7,8 1 (default) 1 5 1-1/2 1 6,7,8 2 lcr[3]: tx and rx parity select parity or no parity can be selected via this bit. the pa rity bit is a simple way used in communications for data integrity check. see table 11 for parity select ion summary below. x logic 0 = no parity. x logic 1 = a parity bit is generated during the transmissi on while the receiver checks for parity error of the data character received. lcr[4]: tx and rx parity select if the parity bit is enabled with lcr bit-3 set to a logi c 1, lcr bit-4 selects the even or odd parity format. x logic 0 = odd parity is generated by forcing an odd number of logic 1?s in the transmitted character. the receiver must be programmed to check the same format (default). x logic 1 = even parity is gen erated by forcing an even numb er of logic 1?s in the tr ansmitted character. the receiver must be programmed to check the same format. lcr[5]: tx and rx parity select if the parity bit is enabled, lcr bit- 5 selects the forced parity format. x lcr bit-5 = logic 0, parity is not forced (default). x lcr bit-5 = logic 1 and lcr bit-4 = logic 0, parity bit is forced to a logical 1 for the transmit and receive data. x lcr bit-5 = logic 1 and lcr bit-4 = logic 1, parity bit is forced to a logical 0 for the transmit and receive data. t able 11: p arity selection lcr b it -5 lcr b it -4 lcr b it -3 p arity selection x x 0 no parity 0 0 1 odd parity 0 1 1 even parity 1 0 1 force parity to mark, high 1 1 1 forced parity to space, low bit-2
xr16m890 37 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters lcr[6]: transmit break enable when enabled, the break control bit causes a break cond ition to be transmitted (the tx output is forced to a ?space?, logic 0, state). this co ndition remains, until disabled by setting lcr bit-6 to a logic 0. x logic 0 = no tx break condition. (default) x logic 1 = forces the transmitter output (tx) to a ?space ?, logic 0, for alerting the remote receiver of a line break condition. lcr[7]: baud rate divisors enable baud rate generator divisor (dll/dlm/dld) enable. x logic 0 = data registers are selected. (default) x logic 1 = divisor latch registers are selected. 3.7 modem control register (mcr) or general purpose outputs control - read/write the mcr register is used for controlling the serial/mod em interface signals or g eneral purpose inputs/outputs. mcr[0]: dtr# output the dtr# pin is a modem control outpu t. if the modem interface is not us ed, this output may be used as a general purpose output. x logic 0 = force dtr# output high (default). x logic 1 = force dtr# output low. mcr[1]: rts# output the rts# pin is a modem control output and may be used for automatic hardware flow control by enabled by efr bit-6. if the modem interface is not used, this output may be used as a general purpose output. x logic 0 = force rts# output high (default). x logic 1 = force rts# output low. it is required to start auto rts flow control. mcr[2]: gpio[3:0] or modem io select this bit controls whether gpio[3:0] behave as gpio pins or as modem io pi ns (ri#, cd#, dtr#, dsr#) x logic 0 = gpio[3:0] behave as gpio pins x logic 1 = gpio[3:0] behave as ri#, cd#, dtr#, dsr# in the loopback mode, this bit is used as the op1# to write the state of the modem ri# interface signal. mcr[3]: int output enable enable or disable int outputs to become active or in th ree-state. this bit is also used to control the op2# signal during internal loopback mode. this bit applies on ly to the intel and vlio bus modes. this bit has no effect in the motorola bus mode. x logic 0 = int output disabled (three state). duri ng internal loopback mode, op2# is high. x logic 1 = int output enabled (active). during internal loopback mode, op2# is low. t able 12: int o utput m odes b it -3 int o utput 0 three-state 1 active mcr
xr16m890 38 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 mcr[4]: internal loopback enable ? logic 0 = disable loopback mode (default). ? logic 1 = enable local loopback mode, see loopback section and figure 17 . mcr[5]: xon-any enable (requires efr bit-4 = 1) ? logic 0 = disable xon-any function (for 16c550 compat ibility, default). ? logic 1 = enable xon-any function. in this mode, any rx character rece ived will resume transmit operation. the rx character will be loaded into the rx fifo , unless the rx character is an xon or xoff character and the m890 is programmed to use the xon/xoff flow control. mcr[6]: infrared encoder/decoder enable (requires efr bit-4 = 1) ? logic 0 = enable the standard modem receive an d transmit input/output interface. (default) ? logic 1 = enable infrared irda receive and transmit inputs/outputs. the tx/rx output/input are routed to the infrared encoder/decoder. the data input and output levels conform to the irda infrared interface requirement. the rx fifo may need to be flushed upon enable. while in this mode, the infrared tx output will be low during idle data conditions. mcr[7]: clock prescaler select (requires efr bit-4 = 1) ? logic 0 = divide by one. the input clock from the crystal or external clock is fed directly to the programmable baud rate generator without further modification, i.e., divide by one (default). ? logic 1 = divide by four. the prescaler divides the input clock from the crystal or external clock by four and feeds it to the programmable baud rate generator, hence, data rates become one forth. 3.8 line status register (lsr) - read only this register provides the status of data transfers betw een the uart and the host. if ier bit-2 is enabled, lsr bit 1 will generate an inte rrupt immediately and lsr bits 2-4 will generate an inte rrupt when a character with an error is in the rhr. lsr[0]: receive data ready indicator ? logic 0 = no data in receive holding register or fifo (default). ? logic 1 = data has been received and is save d in the receive holding register or fifo. lsr[1]: receiver overrun flag ? logic 0 = no overrun error (default). ? logic 1 = overrun error. a data overrun error condition occurred in the receive shift register. this happens when additional data arrives while the fi fo is full. in this case the previous data in the receive shift register is overwritten. note that under this condition the data byte in the receive shift register is not transferred into the fifo, therefore the data in the fifo is not corrupted by the error. lsr[2]: receive data parity error tag ? logic 0 = no parity error (default). ? logic 1 = parity error. the receive character in rhr does not have correct pa rity information and is suspect. this error is associated with the char acter available for reading in rhr. lsr[3]: receive data framing error tag ? logic 0 = no framing error (default). ? logic 1 = framing error. the receive character did not hav e a valid stop bit(s). this error is associated with the character available for reading in rhr.
xr16m890 39 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters lsr[4]: receive break tag ? logic 0 = no break condition (default). ? logic 1 = the receiver received a break signal (rx wa s low for at least one char acter frame time). in the fifo mode, only one break character is loaded into the fifo. the break indication remains until the rx input returns to the idle condition, ?mark? or high. lsr[5]: transmit holding register empty flag this bit is the transmit holding register empty indicator. the thr bit is set to a logic 1 when the last data byte is transferred from the transmit holding register to th e transmit shift register. t he bit is reset to logic 0 concurrently with the data loading to the transmit holding r egister by the host. in the fifo mode this bit is set when the transmit fifo is empty, it is cleared when the transmit fifo contains at least 1 byte. lsr[6]: thr and tsr empty flag this bit is set to a logic 1 whenever the transmitter goes idle. it is set to logic 0 whenever either the thr or tsr contains a data character. in the fifo mode this bi t is set to a logic 1 whenever the transmit fifo and transmit shift register are both empty. lsr[7]: receive fifo data error flag ? logic 0 = no fifo error (default). ? logic 1 = a global indicator for the sum of all error bits in the rx fifo. at least one parity error, framing error or break indication is in the fifo data. this bit clears wh en there is no more error(s) in any of the bytes in the rx fifo.
xr16m890 40 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 3.9 setup/hysteresis register (shr) - write only in the auto rs-485 half-duplex mode, the rts# control output can be asserted from 0 to 15 bit times before data is transmitted to allow for the startup time of an rs-485 transceiver that may be in shutdown mode. the rts# control output can also be delayed from 0 to 15 bi t times after the last byte has been transmitted to allow the data to propogate down long data cables. in the auto rts flow control mode , this register selects the hyster esis levels that will be used with programmable trigger levels (trigger table-d). shr[3:0]: rs-485 turn-around delay / auto rts hysteresis when the auto rs-485 half-dup lex mode is enabled (fctr[3] = 1), th e value programmed in these bits will be the number of bits (0-15) the rts# pin will wait before it is de-asserted after the last byte that has been transmitted. when auto rts flow control is enabled (efr[6] = 1) and programmable trigger levels are used (fctr[5:4] = ?11?), these bits select the hysteresis le vels for the rts# flow control pin (see table 13 ). t able 13: a uto rts h ysteresis shr b it -3 shr b it -2 shr b it -1 shr b it -0 rts# h ysteresis (c haracters ) 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 4 6 8 0 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 8 16 24 32 1 1 1 1 0 0 0 0 0 0 1 1 0 1 0 1 40 44 48 52 1 1 1 1 1 1 1 1 0 0 1 1 0 1 0 1 12 20 28 36 shr[7:4]: rs-485 setup delay when the auto rs-485 half-dup lex mode is enabled (fctr[3] = 1), th e value programmed in these bits will be the number of bits (0-15) the rts# pin is as serted before the first byte is transmitted.
xr16m890 41 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters 3.10 modem status register (msr) - read only this register provides the current state of the modem interf ace input signals. lower four bits of this register are used to indicate the changed information. these bits are set to a logic 1 whenever a signal from the modem changes state. these bits may be used for general purpose inputs when they are not used with modem signals. reading the higher four bits shows the status of the modem signals. msr[0]: delta cts# input flag ? logic 0 = no change on cts# input (default). ? logic 1 = the cts# input has changed state since the la st time it was monitored. a modem status interrupt will be generated if msr interrup t is enabled (ier bit-3). msr[1]: delta dsr# input flag ? logic 0 = no change on dsr# input (default). ? logic 1 = the dsr# input has changed state since the last time it was monitored. a modem status interrupt will be generated if msr interrup t is enabled (ier bit-3). msr[2]: delta ri# input flag ? logic 0 = no change on ri# input (default). ? logic 1 = the ri# input has changed from low to high, ending of the ringing signal. a modem status interrupt will be ge nerated if msr in terrupt is enabled (ier bit-3). msr[3]: delta cd# input flag ? logic 0 = no change on cd# input (default). ? logic 1 = indicates that the cd# input has changed st ate since the last time it was monitored. a modem status interrupt will be generated if msr interrupt is enabled (ier bit-3).
xr16m890 42 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 msr[4]: cts input status cts# pin may function as automatic hardware flow control signal input if it is enabled and selected by auto cts (efr bit-7). auto cts flow control allows starting and stopping of local data transmissions based on the modem cts# signal. a high on the cts# pin will stop uart transmitte r as soon as the current character has finished transmission, and a low will re sume data transmission. normally ms r bit-4 bit is the complement of the cts# input. however in the loopback mode, this bit is equivalent to the rts# bit in the mcr register. the cts# input may be used as a general purpose input when the modem interface is not used. msr[5]: dsr input status normally this bit is the complement of the dsr# input. in the loopback mode , this bit is equivalent to the dtr# bit in the mcr register. the dsr# input may be used as a general purpose input when the modem interface is not used. msr[6]: ri input status normally this bit is the complement of the ri# input. in the loopback mode th is bit is equivalent to bit-2 in the mcr register. the ri# input may be used as a general purpose input when the modem interface is not used. msr[7]: cd input status normally this bit is the complement of the cd# input. in the loopback mode this bit is equivalent to bit-3 in the mcr register. the cd# input may be used as a general purpose input when the modem interface is not used. 3.11 special function register (sfr) - write only this register provides access to some of the advanc ed features of xr16m890. this register can only be written to if efr[4] = 1. sfr[0]: enable gpio registers (requires efr[4] = 1) ? logic 0 = gpio control and status registers are not enabled. ? logic 1 = gpiolvl register is accessible at spr r egister location. gpioint, gpio3t, gpioinv, gpiosel registers are accessible at xon1, xon2, xoff1, and xoff2 register locations. sfr[1]: gpio[15:8] or gpio[7:0] select (requires efr[4] = 1) ? logic 0 = gpiolvl, gpioint, gpio3t, gpioinv and gp iosel registers will contro l and report the status of gpio[7:0]. ? logic 1 = gpiolvl, gpioint, gpio3t, gpioinv and gp iosel registers will contro l and report the status of gpio[15:8]. sfr[2]: gpio interrupt enable (requires efr[4] = 1) ? logic 0 = gpio interrupt is disabled. ? logic 1 = gpio interrupt is enabled. gpios that hav e been configured as inputs can generate gpio interrupts if the bit is enabled in the gpioint register. the polarity of the gpio interrupt is selected via the gpioinv register. sfr[3]: enable/disable fast ir mode (requires efr[4] = 1) the m890 supports the new fast ir transmission with data rate up to 1.152 mbps. ? logic 0 = irda version 1.0, 3/16 pulse rati o, data rate up to 115.2 kbps (default). ? logic 1 = irda version 1.1, 1/4 pulse ratio, data rate up to 1.152 mbps. for more ir mode information, please see ?section 1.19, infrared mode? on page 24. sfr[4]: enable/disable transmitter (requires efr[4] = 1) ? logic 0 = enable transmitter (default). ? logic 1 = disable transmitter.
xr16m890 43 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters sfr[5]: enable/disable receiver (requires efr[4] = 1) ? logic 0 = enable receiver (default). ? logic 1 = disable receiver. sfr[6]: enable/disable 9-bit mode (requires efr[4] = 1) for the 9-bit mode information, see ?section 1.17, normal multidrop (9-bit) mode - receiver? on page 23. ? logic 0 = normal 8-bit mode (default). ? logic 1 = enable 9-bit or multidrop mode. sfr[7]: tx address bit (requires efr[4] = 1) this bit requires that forced "0" parity is enabled (lcr[5 :3]=?111?). if this bit is enabled, the 9th bit of the next byte written to thr will be a ?1?. this bit resets af ter a write to thr. for the 9-bit mode information, see ?section 1.18, multidrop (9-bit) mode - transmitter? on page 23. ? logic 0 = value of 9th bit will be ?0? (default). ? logic 1 = value of 9th bit will be ?1?. 3.12 scratch pad register (spr) - read/write this is an 8-bit general purpose register for the user to store temporary data. the content of this register is preserved during sleep mode but becomes 0xff (default) after a reset or a power off-on cycle. 3.13 gpio level register (gpiolvl) - read/write this register provides the curr ent state of the gpio pins. if a gpio has been configured as an input: a read will report the current state of the input. a write to any gpio configured as an input will not have any effect. if a gpio has been configured as an output: a read will report the curren t value of the register. the current value of the register will also be the current state of the output pin if three-st ate mode is not enabled (gpio3t register). a write will change the current value of the register. the current val ue of the register will also be the current state of the output pin if three-st ate mode is not enabled (gpio3t register).
xr16m890 44 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 3.14 enhanced mode select register (emsr) - write-only this register replaces spr (during a write) and is accessible only when fctr[6] = 1. emsr[1:0]: receive/transmit fifo level count when scratchpad swap (fctr[6]) is asserted, emsr bits 1-0 controls what mode the fifo level counter is operating in. t able 14: s cratchpad s wap s election fctr[6] emsr[1] emsr[0] scratchpad is 0 x x scratchpad 1 x 0 rx fifo level counter mode 1 0 1 tx fifo level counter mode 1 1 1 alternate rx/tx fifo counter mode during alternate rx/tx fifo level counter mode, the first value read after emsr bits 1-0 have been asserted will always be the rx fifo level counter. th e second value read will corr espond with the tx fifo level counter. the next value will be the rx fifo le vel counter again, then the tx fifo level counter and so on and so forth. emsr[2]: send tx immediately x logic 0 = do not send tx immediately (default). x logic 1 = send tx immediately. when fifo is enabled and this bit is se t, the next data w ill be written to the tx shift register. thus, the data will be sent out immedi ately instead of queuing in the fifo. every time, only 1 byte will be send out. once this byte has been sent out, the emsr[2] will go back to 0 automatically. if more than 1 byte will be sent out, emsr[2 ] needs to be set to 1 for each byte. emsr[3]: invert rts in rs485 mode x logic 0 = rts# output is a logic 0 during tx(default). x logic 1 = rts# output is a logic 1 during tx. emsr[4]: modem outputs three-state control x logic 0 = tx, rts#, and dtr# outputs are active (default). x logic 1 = tx, rts#, and dtr# outputs are in three-state mode. emsr[5]: reserved this bit is reserved and should be ?0?. emsr[6]: lsr interrupt mode x logic 0 = lsr interrupt delayed (default ). lsr bits 2, 3, and 4 will genera te an interrupt w hen the character with the error is in the rhr. x logic 1 = lsr interrupt immedi ate. lsr bits 2, 3, and 4 will generate an interrupt as soon as the character is received into the fifo.
xr16m890 45 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters emsr[7]: xoff/special character interrupt mode select this bit selects how the xoff and special character interr upt is cleared. the xon interrupt can only be cleared by reading the isr register. x logic 0 = xoff interrupt is cleared by either readin g isr register or when an xon character is received. special character interrupt is cleared by either readi ng isr register or when next character is received. (default). x logic 1 = xoff/special character interrupt can only be cleared by reading the isr register. 3.15 baud rate generator registers (dll, dlm and dld) - read/write these registers make-up the value of the baud rate divisor. the m890 has different dll, dlm and dld for transmitter and receiver. it provides more convenience for the transmitter and receiver to transmit data with different rate. the m890 uses dld[7:6] to select tx or rx. then it provides dld[ 5:0] to select the sampling frequency and fractional baud rate divisor. the concatenation of the contents of dlm and dll gives the 16-bit divisor value. the value is added to dld[3:0]/16 to ac hieve the fractional baud rate divisor. dld must be enabled via efr bit-4 before it can be accessed. see table 15 below and see ?section 1.8, programmable baud rate generator with fractional divisor? on page 15. dld[5:4]: sampli ng rate select these bits select the data sampling rate. by default, the data sampling rate is 16x. the maximum data rate will double if the 8x mode is selected and will quadruple if th e 4x mode is selected. see table 15 below. t able 15: s ampling r ate s elect s ampling r ate 0 0 16x 0 1 8x 1 x 4x dld[6]: independent brg enable x logic 0 = the transmitter and receiver uses the same baud rate generator (default). x logic 1 = the transmitter and receiver uses differen t baud rate generators. use dld[7] for selecting which baud rate generator to configure. dld[7]: brg select when dld[6] = 1, this bit selects whether the values written to dll, dlm and dld[5:0] will be for the transmit baud rate generator or the receive baud rate generator. when dld[6] = 0 (same baud rate generator used for both tx and rx), this bit must be a logic 0 to properly write to the appropriate dll, dlm and dld[5:0]. dld[5] dld[4]
xr16m890 46 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 . t able 16: brg s elect 0 0 transmitter and receiver uses same brg. writing to dll, dlm and dld[5:0] conf igures the brg for both the tx and rx. 0 1 transmitter and receiver uses different brgs. writing to dll, dlm and dld[5: 0] configures the brg for tx. 1 1 transmitter and receiver uses different brgs. writing to dll, dlm and dld[5:0] configures the brg for rx. 1 0 transmitter and receiver uses same brg. writing to dll, dlm and dld[5:0] has no effect on brg used by the tx and rx. 3.16 trigger level register (trg) - write-only user programmable transmit/receive trigger level register. trg[7:0]: trigger level register these bits are used to program desired trigger levels when trigger table-d is selected. fctr bit-7 selects between programming the rx trigger level (a logic 0) and the tx trigger level (a logic 1). 3.17 rx/tx fifo level count register (fc) - read-only this register replaces spr (during a read) and is a ccessible when fctr[6] = 1. this register is also accessible when lcr = 0xbf. it is suggested to read the fifo level count register at the scratchpad register location when fctr bit-6 = 1. see table 14 . fc[7:0]: rx/tx fifo level count receive/transmit fifo level count. number of characte rs in receiver fifo (fct r[7] = 0) or transmitter fifo (fctr[7] = 1) can be read via this register. 3.18 feature control register (fctr) - read/write fctr[0]: sleep/pwrdn# function control x logic 0 = sleep pin (input) is enabl ed. this pin can be used to forc e the xr16m890 to enter the sleep mode immediately after the next data byte that is be ing transmitted on the tx pin and being received on the rx pin has been completed. x logic 1 = pwrdn# pin (output) is enabled. when th e xr16m890 enters the sle ep mode, this pin will be low. when the xr16m890 is not in sleep mode, this pin will be high. fctr[1]: reserved this bit is reserved and should be ?0?. fctr[2]: irda rx inversion x logic 0 = select rx input as encoded irda data (idle state will be low). x logic 1 = select rx input as inverted en coded irda data (idle state will be high). dld[7] dld[6] brg
xr16m890 47 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters fctr[3]: auto rs-485 direction control x logic 0 = standard st16c550 mode. transmitter generates an interrupt when transmit holding register becomes empty and transmit shift register is shifting data out. x logic 1 = enable auto rs485 direction control function . the direction control signal, rts# pin, changes its output logic state from low to high one bit time after t he last stop bit of the last character is shifted out. also, the transmit interrupt generation is delayed unt il the transmitter shift register becomes empty. the rts# output pin will automatically retu rn to a low when a data byte is loaded into the tx fifo. however, rts# behavior can be inverted by setting emsr[3] = 1. fctr[5:4]: transmit/receive trigger table select see t able 17: t rigger t able s elect b it -5 b it -4 t able 0 0 table-a (tx/rx) 0 1 table-b (tx/rx) 1 0 table-c (tx/rx) 1 1 table-d (tx/rx) table 17 for more details. fctr[6]: scratchpad swap x logic 0 = scratch pad register is selected as genera l read and write register. st16c550 compatible mode. x logic 1 = fifo count register (read-only), enhanced mode select register (write-only). number of characters in transmit or receive fifo can be read via scratch pad register when this bit is set. enhanced mode select register is select ed when it is written into. fctr[7]: programmable trigger register select x logic 0 = registers trg and fc selected for rx. x logic 1 = registers trg and fc selected for tx. 3.19 enhanced feature register (efr) - read/write enhanced features are enabled or disabled using this register. bit 0-3 provide si ngle or dual consecutive character software flow control selection (see table 18 ). when the xon1 and xon2 and xoff1 and xoff2 modes are selected, the double 8-bit words are concatenated in to two sequential characters. caution: note that whenever changing the tx or rx flow control bits, always reset all bits back to logic 0 (disable) before programming a new setting. fctr fctr
xr16m890 48 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 efr[3:0]: software flow control select single character and dual sequential characters software flow control is supported. combinations of software flow control can be selected by programming these bits. t able 18: s oftware f low c ontrol f unctions efr bit -3 c ont -3 efr bit -2 c ont -2 efr bit -1 c ont -1 efr bit -0 c ont -0 t ransmit and r eceive s oftware f low c ontrol 0 0 0 0 no tx and rx flow control (default and reset) 0 0 x x no transmit flow control 1 0 x x transmit xon1, xoff1 0 1 x x transmit xon2, xoff2 1 1 x x transmit xon1 and xon2, xoff1 and xoff2 x x 0 0 no receive flow control x x 1 0 receiver compares xon1, xoff1 x x 0 1 receiver compares xon2, xoff2 1 0 1 1 transmit xon1, xoff1 receiver compares xon1 or xon2, xoff1 or xoff2 0 1 1 1 transmit xon2, xoff2 receiver compares xon1 or xon2, xoff1 or xoff2 1 1 1 1 transmit xon1 and xon2, xoff1 and xoff2, receiver compares xon1 and xon2, xoff1 and xoff2 0 0 1 1 no transmit flow control, receiver compares xon1 and xon2, xoff1 and xoff2 efr[4]: enhanced function bits enable enhanced function control bit. this bit enables ier bits 4-7, isr bits 4-5, fcr bits 3-5, mcr bits 5-7, dld, shr and sfr to be modified. after modifying any enhanced bits, efr bit-4 can be set to a logic 0 to latch the new values. this feature prevents legacy software from altering or overwriting the enhanced functions once set. normally, it is recommended to leave it enabled, logic 1. x logic 0 = modification disable/latch enhanced features. ie r bits 4-7, isr bits 4-5, fcr bits 3-5, mcr bits 5- 7, dld, shr and sfr are saved to retain the user settings. after a reset, the ier bits 4-7, isr bits 4-5, fcr bits 3-5, and mcr bits 5-7, dld, shr and sfr are se t to a logic 0 to be comp atible with st16c550 mode (default). x logic 1 = enables the efr[3:0] register bits to be modified by the user. efr[5]: special character detect enable x logic 0 = special character detect disabled (default). x logic 1 = special character detect enabled. the ua rt compares each incoming receive character with data in xoff-2 register. if a match exists, the receive data will be transfer red to fifo and isr bit-4 will be set to indicate detection of the special character. bit-0 co rresponds with the lsb bit of the receive character. if flow control is set for comparing xon1, xo ff1 (efr [1:0]= ?10?) then flow control and special character work normally. however, if flow control is set for comparing xon2, xoff2 (efr[1:0]= ?01?) then flow control works normally, but xoff2 will not go to the fifo, and will g enerate an xoff interrupt and a special character interrupt, if enabled via ier bit-5.
xr16m890 49 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters efr[6]: auto rts flow control enable rts# output may be used for hardware flow control by setting efr bit-6 to logic 1. when auto rts is selected, an interrupt will be generated when the receive fifo is fi lled to the programm ed trigger level and rts de-asserts high at the next upper trigger level/hysteresis level. rts# will return low when fifo data falls below the next lower trigger leve l/hysteresis level. the rts# output must be asserted (low) before the auto rts can take effect. rts# pin will function as a general purpose ou tput when hardware flow control is disabled. ? logic 0 = automatic rts flow control is disabled (default). ? logic 1 = enable automatic rts flow control. efr[7]: auto cts flow control enable automatic cts flow control. ? logic 0 = automatic cts flow control is disabled (default). ? logic 1 = enable automatic cts flow control. data tr ansmission stops when cts# input de-asserts to logic 1. data transmission resumes when cts# returns to a logic 0. 3.20 software flow control registers (xoff1, xoff2, xon1, xon2) - read/write these registers are used as the programmable software flow control characters xoff1, xoff2, xon1, and xon2. for more details, see table 5 . the xoff2 is also used as auto address detect register when the auto 9-bit mode enabled. see ?section 1.17.1, auto address detection - receiver? on page 23. 3.21 gpio interrupt enable regi ster (gpioint) - read/write if a gpio has been configured as an input, this register selects which inputs can generate a gpio interrupt. this register controls gpio[7:0] when sf r[1] = 0 and gpio[15:8] when sfr[1] = 1. ? logic 0 = gpio interrupt for th is input pin is not enabled. ? logic 1 = gpio interrupt for this input pin is enabled. 3.22 gpio three-state control register (gpio3t) - read/write if a gpio has been configured as an output, this register selects which outputs will be in three-state mode. this register controls gpio[7:0] when sf r[1] = 0 and gpio[15:8] when sfr[1] = 1. ? logic 0 = gpio output is in active mode and can be controlled via gpiolvl register. ? logic 1 = gpio output is in three-state mode. 3.23 gpio polarity control regi ster (gpioinv) - read/write if a gpio has been configured as an interrupt, this re gister selects the polarity that can generate a gpio interrupt. this register controls gpio[7:0] w hen sfr[1] = 0 and gpio[15:8] when sfr[1] = 1. ? logic 0 = gpio interrupt is generated when this in put pin transitions from low to high. read gpiolvl returns gpio pin state. ? logic 1 = gpio interrupt is generated when this inpu t pin transitions from high to low. read gpiolvl returns inverted gpio pin state. 3.24 gpio select register (gpiosel) - read/write this register selects where a gpio is an input or an output. ? logic 0 = gpio is an output. ? logic 1 = gpio is an input (default).
t able 19: uart reset conditions dlm, dll (both tx and rx) dlm = 0x00 and dll = 0x01. only resets to these values during a power up. they do not reset when the reset pin is asserted. dld bits 7-0 = 0x00 rhr bits 7-0 = 0xxx thr bits 7-0 = 0xxx ier bits 7-0 = 0x00 fcr bits 7-0 = 0x00 isr bits 7-0 = 0x01 lcr bits 7-0 = 0x00 mcr bits 7-0 = 0x00 lsr bits 7-0 = 0x60 shr bits 7-0 = 0x00 msr bits 7-0 =0xx0 (bits 7-4 = complement of modem inputs) sfr bits 7-0 = 0x00 spr bits 7-0 = 0xff gpiolvl bits 7-0 = 0x00 emsr bits 7-0 = 0x00 fc bits 7-0 = 0x00 trg bits 7-0 = 0x01 fctr bits 7-0 = 0x00 efr bits 7-0 = 0x00 xon1 bits 7-0 = 0x00 xon2 bits 7-0 = 0x00 xoff1 bits 7-0 = 0x00 xoff2 bits 7-0 = 0x00 gpioint bits 7-0 = 0x00 gpio3t bits 7-0 = 0x00 gpioinv bits 7-0 = 0x00 gpiosel bits 7-0 = 0xff i/o signals reset state tx high rts# high dtr# high int (intel or vlio mode) irq# (motorola mode) three-state condition high xr16m890 50 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 registers reset state
absolute maximum ratings power supply range 3.63 volts voltage at any pin gnd-0.3 v to 3.63 v operating temperature -40 o to +85 o c storage temperature -65 o to +150 o c package dissipation 500 mw typical package thermal resistance data (margin of error: 15%) thermal resistance (32-qfn) theta-ja = 33 o c/w, theta-jc = 22 o c/w thermal resistance (40-qfn) theta-ja = 32 o c/w, theta-jc = 16 o c/w thermal resistance (48-tqfp) theta-ja = 59 o c/w, theta-jc = 16 o c/w electrical characteristics dc electrical characteristics u nless otherwise noted : ta = -40 o to +85 o c, vcc_ xxxx is 1.62v to 3.63v s ymbol p arameter l imits m in m ax l imits m in m ax l imits m in m ax u nits c onditions v ilck clock input low level -0.3 0.3 -0.3 0.4 -0.3 0.6 v (xtal1 input) v ihck clock input high level 1.4 vcc_ core 2.0 vcc_ core 2.4 vcc_ core v v il input low voltage -0.3 0.2 -0.3 0.5 -0.3 0.7 v v ih input high voltage 1.4 5.5 1.8 5.5 2.0 5.5 v v ol output low voltage 0.4 0.4 0.4 v v v i ol = 6 ma i ol = 4 ma i ol = 1.5 ma v oh output high voltage 1.4 1.8 2.0 v v v i oh = -4 ma i oh = -2 ma i oh = -200 ua i il input low leakage current 15 15 15 ua i ih input high leakage current 15 15 15 ua c in input pin capacitance 5 5 5 pf i cc power supply current 2 3 4 ma ext clk = 5mhz i sleep sleep current 5 10 20 ua see test 1 xr16m890 51 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters test 1: all inputs should remain steady at vcc or gnd to minimi ze sleep current. rx input must idle at high while asleep. 1.8v 2.5v 3.3v
xr16m890 52 uart with 128-byte fifo and integrated level shifters rev. 1.0.0 ac electrical characteristics ta = -40 o to +85 o c, v cc is 1.62 to 3.63v, 70 p f load where applicable s ymbol p arameter l imits 1.8v 10% m in m ax l imits 2.5v 10% m in m ax l imits 3.3v 10% m in m ax u nit xtal1 uart crystal frequency 24 24 24 mhz eclk external clock frequency 36 64 100 mhz t eclk external clock time period 13 7 5 ns 16 mode (intel) data bus read/write timing t as address setup time 0 0 0 ns t ah address hold time 0 0 0 ns t cs chip select width 50 45 40 ns t rd ior# strobe width 50 45 40 ns t dy read cycle delay 50 45 40 ns t rdv data access time 45 40 35 ns t dd data disable time 25 20 15 ns t wr iow# strobe width 50 45 40 ns t dy write cycle delay 50 45 40 ns t ds data setup time 30 25 20 ns t dh data hold time 0 0 0 ns 68 mode (motorola) data bus read/write timing t ads address setup 0 0 0 ns t adh address hold 0 0 0 ns t rws r/w# setup to cs# 0 0 0 ns t rda data access time 45 40 35 ns t rdh data disable time 25 15 10 ns t wds write data setup 20 15 10 ns t wdh write data hold 3 3 3 ns t rwh cs# de-asserted to r/w# de-asserted 0 0 0 ns t csl cs# strobe width 50 45 40 ns t csd cs# cycle delay 50 45 40 ns
xr16m890 53 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters vlio data bus read/write timing t as address setup time 15 15 10 ns t ah address hold time 5 5 5 ns t csl delay from cs# to lla#/ior#/iow# 0 0 0 ns t lla lla# strobe width 10 10 10 ns t rd ior# strobe width 50 45 40 ns t llar delay from lla# to ior# 5 5 5 ns t llaw delay from lla# to iow# 5 5 5 ns t dy read/write cycle delay 50 45 40 ns t rdv data access time 45 40 35 ns t dd data disable time 25 20 15 ns t wr iow# strobe width 50 45 40 ns t ds data setup time 15 15 15 ns t dh data hold time 5 5 5 ns modem/interrupt timing t wdo delay from iow# to output 50 50 50 ns t mod delay to set interrupt from modem input 50 50 50 ns t rsi delay to reset interrupt from ior# 50 50 50 ns t ssi delay from stop to set interrupt 1 1 1 bclk t rri delay from ior# to reset interrupt 45 45 45 ns t si delay from start to interrupt 45 45 45 ns t wts delay from initial iow# to transmit start (shr[7:4] = 0x0) 8 33 8 33 8 33 bclk t wts delay from initial iow# to transmit start (shr[7:4] = 0xf) 8 48 8 48 8 48 bclk t wri delay from iow# to reset interrupt 45 45 45 ns t ssr delay from stop to set rxrdy# 1 1 1 bclk t rr delay from ior# to reset rxrdy# 45 45 45 ns t wt delay from iow# to set txrdy# 45 45 45 ns t srt delay from center of start to reset txrdy# 8 8 8 bclk t rst reset pulse width 40 40 40 ns bclk baud clock 16x or 8x or 4x of data rate hz ac electrical characteristics ta = -40 o to +85 o c, v cc is 1.62 to 3.63v, 70 p f load where applicable s ymbol p arameter l imits 1.8v 10% m in m ax l imits 2.5v 10% m in m ax l imits 3.3v 10% m in m ax u nit
f igure 18. c lock t iming osc clk clk external clock f igure 19. m odem i nput /o utput t iming io w # io w rts# dtr# cd# cts# dsr# in t io r # ri# t wdo t mod t mod t rsi t mod active active change of state change of state active active active change of state change of state change of state a ctive a ctive xr16m890 54 uart with 128-byte fifo and integrated level shifters rev. 1.0.0
f igure 20. 16 m ode (i ntel ) d ata b us r ead t iming t as t dd t ah t rd t rdv t dy t dd t rdv t ah t as t cs valid address valid address valid data valid data a0-a2 cs# ior# d0-d7 rdtm t cs t rd f igure 21. 16 m ode (i ntel ) d ata b us w rite t iming 16write t as t dh t ah t wr t ds t dy t dh t ds t ah t as t cs valid address valid address valid data valid data a0-a2 cs# iow# d0-d7 t cs t wr xr16m890 55 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters
f igure 22. 68 m ode (m otorola ) d ata b us r ead t iming 68read t ads t rdh t adh t csl t rda t csd t rws valid address valid address valid data a0-a2 cs# r/w# d0-d7 t rwh valid data f igure 23. 68 m ode (m otorola ) d ata b us w rite t iming 68write t ads t adh t csl t wds t csd t rws valid address valid address valid data a0-a2 cs# r/w# d0-d7 t rwh valid data t wdh xr16m890 56 uart with 128-byte fifo and integrated level shifters rev. 1.0.0
f igure 24. vlio m ode d ata b us r ead t iming upper address ad7- ad0 cs# ior# lower address t dy t rd t csl t as t ah t dd lla# t lla data t llar t rdv t csl f igure 25. vlio m ode d ata b us w rite t iming upper address ad7- ad0 cs# iow# lower address t dy t wr t csl t as t ah t dh lla# t lla data t llaw t ds t csl xr16m890 57 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters
f igure 26. r eceive r eady & i nterrupt t iming [n on -fifo m ode ] rx rxrdy# ior# int d0:d7 start bit d0:d7 stop bit d0:d7 t ssr 1 byte in rhr active data ready active data ready active data ready 1 byte in rhr 1 byte in rhr t ssr t ssr rxnfm t rr t rr t rr t ssr t ssr t ssr (reading data out of rhr) f igure 27. t ransmit r eady & i nterrupt t iming [n on -fifo m ode ] tx txrdy# iow# int* d0:d7 start bit d0:d7 stop bit d0:d7 t wt txnonfifo t wt t wt t wri t wri t wri t srt t srt t srt *int is cleared when the isr is read or when data is loaded into the thr. isr is read isr is read isr is read (loading data into thr) (unloading) ier[1] enabled t wts xr16m890 58 uart with 128-byte fifo and integrated level shifters rev. 1.0.0
f igure 28. r eceive r eady & i nterrupt t iming [fifo m ode ] rx rxrdy# ior# int d0:d7 s t ssr rxintdma# rx fifo fills up to rx trigger level or rx data timeout rx fifo drops below rx trigger level fifo empties first byte is received in rx fifo d0:d7 s d0:d7 t d0:d7 s d0:d7 s t d0:d7 s t t d0:d7 s t start bit stop bit t rr t rri t ssi (reading data out of rx fifo) f igure 29. t ransmit r eady & i nterrupt t iming [fifo m ode ] tx txrdy# iow# int* txdma# d0:d7 s d0:d7 t d0:d7 s d0:d7 s t d0:d7 s t t d0:d7 s t start bit stop bit t wri (unloading) (loading data into fifo) last data byte transmitted tx fifo fills up to trigger level tx fifo drops below trigger level data in tx fifo tx fifo empty t wt t srt tx fifo empty t t s t si isr is read ier[1] enabled isr is read *int is cleared when the isr is read or when tx fifo fills up to the trigger level. t wts xr16m890 59 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters
package dimensions (32 pin qfn - 5 x 5 x 0.9 mm ) note: the actual center pad is metallic and the size (d2) is device-dependent with a typical tolerance of 0.3mm note: the control dimension is in millimeter. inches millimeters symbol min max min max a 0.031 0.039 0.80 1.00 a1 0.000 0.002 0.00 0.05 a3 0.006 0.010 0.15 0.25 d 0.193 0.201 4.90 5.10 d2 0.138 0.150 3.50 3.80 b 0.007 0.012 0.18 0.30 e 0.0197 bsc 0.50 bsc l 0.012 0.020 0.35 0.45 k 0.008 - 0.20 - xr16m890 60 uart with 128-byte fifo and integrated level shifters rev. 1.0.0
package dimensions (40 pin qfn - 6 x 6 x 0.9 mm ) note: the actual center pad is metallic and the size (d2) is device-dependent with a typical tolerance of 0.3mm note: the control dimension is in millimeter. a 0.031 0.039 0.80 1.00 a1 0.000 0.002 0.00 0.05 a3 0.006 0.010 0.15 0.25 d 0.232 0.240 5.90 6.10 d2 0.189 0.197 4.80 5.00 b 0.007 0.012 0.18 0.30 e 0.0197 bsc 0.50 bsc l 0.014 0.018 0.35 0.45 k 0.008 - 0.20 - xr16m890 61 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters inches millimeters symbol min max min max
package dimensions (48 pin tqfp - 7 x 7 x 1 mm ) 36 25 24 13 1 1 2 37 48 d d 1 d d 1 b e d a 2 a 1 a seating plane l c note: the control dimension is the millimeter column inches millimeters symbol min max min max a 0.039 0.047 1.00 1.20 a1 0.002 0.006 0.05 0.15 a2 0.037 0.041 0.95 1.05 b 0.007 0.011 0.17 0.27 c 0.004 0.008 0.09 0.20 d 0.346 0.362 8.80 9.20 d1 0.272 0.280 6.90 7.10 e 0.020 bsc 0.50 bsc l 0.018 0.030 0.45 0.75 d 0 q 7 q 0 q 7 q xr16m890 62 uart with 128-byte fifo and integrated level shifters rev. 1.0.0
revision history d ate r evision d escription april 2011 1.0.0 final datasheet. 63 notice exar corporation reserves the right to make changes to the products contained in this publicat ion in order to improve design, performanc e or reliability. exar corp oration assumes no responsibility for the use of any circuits described herein, conveys no license under any patent or other right, and makes no representation that the circuits are free of patent in fringement. charts and sc hedules contained here in are only for illustration purposes and may vary depending upon a user?s specific application. while the information in this publication has been carefully ch ecked; no responsibility, however , is assumed for inaccuracies. exar corporation does not re commend the use of any of its products in life suppo rt applications where the failure or malfunction of the product can reasonably be ex pected to cause failure of the life support system or to significantly affect its safety or effectiveness. products ar e not authorized for use in such applications unless exar corporation receives , in writing, assurances to its satisfaction that: (a) the ri sk of injury or damage has been minimized; (b) the us er assumes all such risks; (c) potential liability of exar corporation is adequately protected under the circumstances. copyright 2011 exar corporation datasheet april 2011. send your uart technical inquiry with technical details to hotline: uarttechsupport@exar.com . reproduction, in part or whole, without the prior written consent of exar co rporation is prohibited. xr16m890 rev. 1.0.0 uart with 128-byte fifo and integrated level shifters


▲Up To Search▲   

 
Price & Availability of XR16M890IL40

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X